home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / xymtex / hetarom.sty < prev    next >
Text File  |  1994-07-10  |  116KB  |  3,649 lines

  1. % hetarom.sty
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.00}
  4. \typeout{       -- Released December 1, 1993 by Shinsaku Fujita}
  5. \typeout{}
  6. \typeout{}
  7. % Copyright (C) 1993 by Shinsaku Fujita, all rights reserved.
  8. %
  9. % This file is a part of the macro package ``XyMTeX'' which has been 
  10. % designed for typesetting chemical structural formulas.
  11. %
  12. % This file is to be contained in the ``xymtex'' directory which is 
  13. % an input directory for TeX. It is a LaTeX optional style file and 
  14. % should be used only within LaTeX, because several macros of the file 
  15. % are based on LaTeX commands. 
  16. %
  17. % For the review of XyMTeX, see
  18. %  (1)  Shinsaku Fujita, ``Typesetting structural formulas with the text
  19. %    formatter TeX/LaTeX'', Computers and Chemistry, in press.    
  20. % The following book deals with an application of TeX/LaTeX to 
  21. % preparation of manuscripts of chemical fields:
  22. %  (2)  Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' 
  23. %    Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese].  
  24. %
  25. % Copying of this file is authorized only if either
  26. %  (1) you make absolutely no changes to your copy, including name and 
  27. %     directory name; or
  28. %  (2) if you do make changes, 
  29. %     (a) you name it something other than the names included in the 
  30. %         ``xymtex'' directory and 
  31. %     (b) you are requested to leave this notice intact.
  32. % This restriction ensures that all standard styles are identical.
  33. %
  34. % Please report any bugs, comments, suggestions, etc. to:
  35. %   Shinsaku Fujita, 
  36. %   Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., 
  37. %   Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
  38. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  39. \def\j@urnalname{hetarom}
  40. \def\versi@ndate{December 01, 1993}
  41. \def\versi@nno{ver1.00}
  42. \def\copyrighth@lder{SF} % Shinsaku Fujita
  43. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  44. %\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>\space%
  45. % [\copyrighth@lder]}
  46. %
  47. % *********************************
  48. % * hetarom.sty: list of commands *
  49. % *********************************
  50. %
  51. % <Various flags (switches)>
  52. %
  53. %     \if@gclip \@gclipfalse \@gcliptrue
  54. %     \if@hclip \@hclipfalse \@hcliptrue
  55. %     \if@iclip \@iclipfalse \@icliptrue
  56. %     \if@jclip \@jclipfalse \@jcliptrue
  57. %     \iniflag
  58. %     \iniatom
  59. %     \aaa
  60. %     \bbb
  61. %     \ccc
  62. %     \ddd
  63. %     \eee
  64. %     \fff
  65. %     \ggg
  66. %     \hhh
  67. %     \iii
  68. %     \jjj
  69. %
  70. %  <Six-Membered Heterocycles>
  71. %    Setting inner double bonds
  72. %
  73. %     \bonda
  74. %     \bondb
  75. %     \bondc
  76. %     \bondd
  77. %     \bonde
  78. %     \bondf
  79. %     \bondhoriz
  80. %     \bondhorizi
  81. %
  82. %    Setting skeletal bonds
  83. %
  84. %     \skbonda
  85. %     \skbondf
  86. %     \skbondc
  87. %     \skbondd
  88. %     \skbondb
  89. %     \skbonde
  90. %     \skbondhoriz
  91. %     \skbondhorizi
  92. %
  93. %    Basic Macros
  94. %
  95. %     \sixheterov               \@sixheterov
  96. %     \sixheterovi              \@sixheterovi
  97. %
  98. %    Application Macros
  99. %
  100. %     \pyridinev                \@pyridinev
  101. %     \pyridinevi               \@pyridinevi
  102. %     \pyrazinev                \@pyrazinev
  103. %     \pyrimidinev              \@pyrimidinev
  104. %     \pyrimidinevi             \@pyrimidinevi
  105. %     \pyridazinev              \@pyridazinev
  106. %     \pyridazinevi             \@pyridazinevi
  107. %     \triazinev                \@triazinev
  108. %     \triazinevi               \@triazinevi
  109. %
  110. %  <Five-Membered Heterocycles>
  111. %    Basic Macros
  112. %
  113. %     \fiveheterov              \@fiveheterov
  114. %     \fiveheterovi             \@fiveheterovi
  115. %
  116. %    Application Macros
  117. %
  118. %     \pyrrolev                 \@pyrrolev
  119. %     \pyrazolev                \@pyrazolev
  120. %     \imidazolev               \@imidazolev
  121. %     \isoxazolev               \@isoxazolev
  122. %     \oxazolev                 \@oxazolev
  123. %     \pyrrolevi                \@pyrrolevi
  124. %     \pyrazolevi               \@pyrazolevi
  125. %     \imidazolevi              \@imidazolevi
  126. %     \isoxazolevi              \@isoxazolevi
  127. %     \oxazolevi                \@oxazolevi
  128. %
  129. %  <Six-Six-Fused Heterocycles>
  130. %    Basic Macros
  131. %
  132. %     \decaheterov              \@decaheterov
  133. %     \decaheterovi             \@decaheterovi
  134. %
  135. %    Application Macros
  136. %
  137. %     \quinolinev               \@quinolinev
  138. %     \quinolinevi              \@quinolinevi
  139. %     \isoquinolinev            \@isoquinolinev
  140. %     \isoquinolinevi           \@isoquinolinevi
  141. %     \quinoxalinev             \@quinoxalinev
  142. %     \quinazolinev             \@quinazolinev
  143. %     \quinazolinevi            \@quinazolinevi
  144. %     \cinnolinev               \@cinnolinev
  145. %     \cinnolinevi              \@cinnolinevi
  146. %     \pteridinev               \@pteridinev
  147. %     \pteridinevi              \@pteridinevi
  148. %
  149. %  <Six-Five-Fused Heterocycles>
  150. %    Basic Macros
  151. %
  152. %     \nonaheterov              \@nonaheterov
  153. %     \nonaheterovi             \@nonaheterovi
  154. %
  155. %    Application Macros
  156. %
  157. %     \purinev                  \@purinev
  158. %     \purinevi                 \@purinevi
  159. %     \indolev                  \@indolev
  160. %     \indolevi                 \@indolevi
  161. %     \indolizinev              \@indolizinev
  162. %     \indolizinevi             \@indolizinevi
  163. %     \isoindolev               \@isoindolev
  164. %     \isoindolevi              \@isoindolevi
  165. %     \benzofuranev             \@benzofuranev
  166. %     \benzofuranevi            \@benzofuranevi
  167. %     \isobenzofuranev          \@isobenzofuranev
  168. %     \isobenzofuranevi         \@isobenzofuranevi
  169. %     \benzoxazolev             \@benzoxazolev
  170. %     \benzoxazolevi            \@benzoxazolevi
  171. %
  172. %  <Four-Membered Heterocycles>
  173. %    Setting bonds
  174. %     \bondshoriz               \bondshorizi
  175. %     \skbondshoriz             \skbondshorizi
  176. %
  177. %    Basic Macros
  178. %
  179. %     \fourhetero               \@fourhetero
  180. %
  181. %  <Four-Membered Heterocycles>
  182. %    Setting inner double bonds
  183. %
  184. %     \bondtria                 \bondtrib
  185. %     \skbondtria               \skbondtrib
  186. %
  187. %    Basic Macros
  188. %
  189. %     \threehetero              \@threehetero
  190. %
  191. %  <Building Units>
  192. %
  193. %     \sixunitv                 \@sixunitv
  194. %     \fiveunitv                \@fiveunitv
  195. %     \fiveunitvi               \@fiveunitvi
  196. %
  197. % *************************
  198. % * input of basic macros *
  199. % *************************
  200. \@ifundefined{setsixringv}{\input chemstr.sty\relax}{}%
  201. \unitlength=0.1pt%
  202. %% ****************************
  203. %% * various flags (switches) *
  204. %% ****************************
  205. %\newif\if@gclip \@gclipfalse%
  206. %\newif\if@hclip \@hclipfalse%
  207. %\newif\if@iclip \@iclipfalse%
  208. %\newif\if@jclip \@jclipfalse%
  209. %\def\iniflag{%
  210. %\@aclipfalse \@bclipfalse\@cclipfalse\@clipfalse\@eclipfalse%
  211. %\@fclipfalse\@gclipfalse\@hclipfalse\@iclipfalse\@jclipfalse%
  212. %\@clipfusefalse}%
  213. %\def\iniatom{%
  214. %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
  215. %\def\ggg{}\def\hhh{}\def\iii{}\def\jjj{}%
  216. %\def\@aaa{}\def\@bbb{}\def\@ccc{}\def\@ddd{}\def\@eee{}\def\@fff{}%
  217. %}%
  218. %\def\resetbdsw{\gdef\@aaa{a}\gdef\@bbb{b}\gdef\@ccc{c}%
  219. %\gdef\@ddd{d}\gdef\@eee{e}\gdef\@fff{f}}%
  220. %
  221. \iniatom%
  222. % ******************************
  223. % * setting inner double bonds *
  224. % ******************************
  225. % These macros are used in \sixhetero and \fivehetero for setting 
  226. % inner double bonds in accordance with the presence or the absence of 
  227. % hetero atoms. The following numbering is adopted in this macro. 
  228. %                   aaa
  229. %                    1
  230. %                  f * a
  231. %           fff 6  *   *  2 bbb
  232. %             e   |     |   b
  233. %                 |     |
  234. %           eee 5  *   *  3 ccc
  235. %                 d  *  c
  236. %                    4 <===== the original point
  237. %                   ddd
  238. % bond between 1 and 2
  239. \def\bonda{%
  240.   \ifx\aaa\empty%
  241.    \ifx\bbb\empty%
  242.     \put(6,364){\line(5,-3){126}}%         %double bond 1-2
  243.    \else%
  244.     \put(6,364){\line(5,-3){100}}%         %double bond 1-2
  245.    \fi%
  246.   \else%
  247.    \ifx\bbb\empty%
  248.     \put(35,340){\line(5,-3){100}}%        %double bond 1-2
  249.    \else%
  250.     \put(35,352){\line(5,-3){100}}%        %double bond 1-2
  251.    \fi%                                    % line <1OO not available
  252.   \fi%
  253.  }%
  254. % bond between 3 and 2
  255.  \def\bondb{%
  256.   \ifx\bbb\empty%
  257.    \ifx\ccc\empty%
  258.     \put(138,129){\line(0,1){148}}%        %double bond 3-2
  259.    \else%
  260.     \put(138,143){\line(0,1){134}}%        %double bond 3-2
  261.    \fi%
  262.   \else%
  263.    \ifx\ccc\empty%
  264.     \put(138,129){\line(0,1){134}}%        %double bond 3-2
  265.    \else%
  266.     \put(138,143){\line(0,1){110}}%        %double bond 3-2
  267.    \fi%
  268.   \fi%
  269. }%
  270. % bond between 4 and 3
  271.  \def\bondc{%
  272.   \ifx\ddd\empty%
  273.    \ifx\ccc\empty%
  274.     \put(6,42){\line(5,3){126}}           %double bond 4-3
  275.    \else% 
  276.     \put(6,42){\line(5,3){100}}           %double bond 4-3
  277.    \fi%
  278.   \else%
  279.    \ifx\ccc\empty%
  280.     \put(35,66){\line(5,3){100}}%          %double bond 4-3
  281.    \else% 
  282.     \put(35,60){\line(5,3){100}}%          %double bond 4-3
  283.    \fi%                                    % line <1OO not available
  284.   \fi%
  285. }%
  286. % bond between 4 and 5
  287.  \def\bondd{%
  288.   \ifx\ddd\empty%
  289.    \ifx\eee\empty%
  290.     \put(-6,42){\line(-5,3){126}}%         %double bond 4-5
  291.    \else% 
  292.     \put(-6,42){\line(-5,3){100}}%         %double bond 4-5
  293.    \fi%
  294.   \else%
  295.    \ifx\eee\empty%
  296.     \put(-35,66){\line(-5,3){100}}%        %double bond 4-5
  297.    \else% 
  298.     \put(-35,60){\line(-5,3){100}}%        %double bond 4-5
  299.    \fi%                                    % line <1OO not available
  300.   \fi%
  301.  }%
  302. % bond between 5 and 6
  303. \def\bonde{%
  304.   \ifx\fff\empty%
  305.    \ifx\eee\empty%
  306.     \put(-138,129){\line(0,1){148}}%       %double bond 5-6
  307.    \else%
  308.     \put(-138,143){\line(0,1){134}}%       %double bond 5-6
  309.    \fi%
  310.   \else%
  311.    \ifx\eee\empty%
  312.     \put(-138,129){\line(0,1){134}}%       %double bond 5-6
  313.    \else%
  314.     \put(-138,143){\line(0,1){110}}%       %double bond 5-6
  315.    \fi%
  316.   \fi%
  317. }%
  318. % bond between 1 and 6
  319. \def\bondf{%
  320.   \ifx\aaa\empty%
  321.    \ifx\fff\empty%
  322.     \put(-6,364){\line(-5,-3){126}}%        %double bond 1-6
  323.    \else%
  324.     \put(-6,364){\line(-5,-3){100}}%        %double bond 1-6
  325.    \fi%
  326.   \else%
  327.    \ifx\fff\empty%
  328.     \put(-35,340){\line(-5,-3){100}}%       %double bond 1-6
  329.    \else%
  330.     \put(-35,352){\line(-5,-3){100}}%       %double bond 1-6
  331.    \fi%                                     % line <1OO not available
  332.   \fi%
  333. }%
  334. % horizontal inner bond for five-membered rings
  335. \def\bondhoriz{%
  336.   \ifx\fff\empty%
  337.     \ifx\bbb\empty%
  338.      \put(-138,270){\line(1,0){277}}%      %double bond 4-3
  339.     \else%
  340.      \put(-138,270){\line(1,0){258}}%      %double bond 4-3
  341.     \fi%
  342.   \else%
  343.     \ifx\bbb\empty%
  344.      \put(-120,270){\line(1,0){258}}%      %double bond 4-3
  345.     \else%
  346.      \put(-120,270){\line(1,0){239}}%      %double bond 4-3
  347.     \fi%
  348.   \fi}%
  349. % horizontal inner bond for five-membered rings (inverse type) 
  350. \def\bondhorizi{%
  351.   \ifx\eee\empty%
  352.     \ifx\ccc\empty%
  353.      \put(-138,136){\line(1,0){277}}%      %double bond 4-3
  354.     \else%
  355.      \put(-138,136){\line(1,0){258}}%      %double bond 4-3
  356.     \fi%
  357.   \else%
  358.     \ifx\ccc\empty%
  359.      \put(-120,136){\line(1,0){258}}%      %double bond 4-3
  360.     \else%
  361.      \put(-120,136){\line(1,0){239}}%      %double bond 4-3
  362.     \fi%
  363.   \fi}%
  364. % **************************
  365. % * setting skeletal bonds *
  366. % **************************
  367. % These macros are used in \sixhetero and \fivehetero for setting 
  368. % skeletal bonds in accordance with the presence or the absence of 
  369. % hetero atoms. The following numbering is adopted in this macro. 
  370. %                   aaa
  371. %                    1
  372. %                  f * a
  373. %           fff 6  *   *  2 bbb
  374. %             e   |     |   b
  375. %                 |     |
  376. %           eee 5  *   *  3 ccc
  377. %                 d  *  c
  378. %                    4 <===== the original point
  379. %                   ddd
  380. %bond between 1 and 2
  381. \def\skbonda{%
  382.   \ifx\aaa\empty%
  383.     \ifx\bbb\empty%
  384.      \put(0,406){\line(5,-3){171}}%        %bond 1-2
  385.     \else%
  386.      \put(0,406){\line(5,-3){136}}%        %bond 1-2
  387.     \fi%
  388.    \else%
  389.     \ifx\bbb\empty%
  390.      \put(35,385){\line(5,-3){136}}%       %bond 1-2
  391.     \else%
  392.      \put(35,385){\line(5,-3){100}}%       %bond 1-2
  393.     \fi%
  394.    \fi}%
  395. %bond between 1 and 6
  396. \def\skbondf{%
  397.   \ifx\aaa\empty%
  398.     \ifx\fff\empty%
  399.      \put(0,406){\line(-5,-3){171}}%       %bond 1-6
  400.     \else%
  401.      \put(0,406){\line(-5,-3){136}}%       %bond 1-6
  402.     \fi%
  403.    \else%
  404.     \ifx\fff\empty%
  405.      \put(-35,385){\line(-5,-3){136}}%     %bond 1-6
  406.     \else%
  407.      \put(-35,385){\line(-5,-3){100}}%     %bond 1-6
  408.     \fi%
  409.    \fi}%
  410. %bond between 4 and 3
  411. \def\skbondc{%
  412.   \ifx\ddd\empty%
  413.     \ifx\ccc\empty%
  414.      \put(0,0){\line(5,3){171}}%           %bond 4-3
  415.     \else%
  416.      \put(0,0){\line(5,3){136}}%           %bond 4-3
  417.     \fi%
  418.   \else%
  419.     \ifx\ccc\empty%
  420.      \put(35,21){\line(5,3){138}}%         %bond 4-3
  421.     \else%
  422.      \put(35,21){\line(5,3){100}}%         %bond 4-3
  423.     \fi%
  424.   \fi}%
  425. %bond between 4 and 5
  426. \def\skbondd{%
  427.   \ifx\ddd\empty%
  428.     \ifx\eee\empty%
  429.      \put(0,0){\line(-5,3){171}}%          %bond 4-5
  430.     \else%
  431.      \put(0,0){\line(-5,3){136}}%          %bond 4-5
  432.     \fi%
  433.   \else%
  434.     \ifx\eee\empty%
  435.      \put(-35,21){\line(-5,3){138}}%       %bond 4-5
  436.     \else%
  437.      \put(-35,21){\line(-5,3){100}}%        %bond 4-5
  438.     \fi%
  439.   \fi}%
  440. %bond between 3 and 2
  441. \def\skbondb{%
  442.   \ifx\bbb\empty%%
  443.     \ifx\ccc\empty%%
  444.      \put(171,103){\line(0,1){200}}%       %bond 3-2
  445.     \else%
  446.      \put(171,143){\line(0,1){160}}%       %bond 3-2
  447.     \fi%
  448.   \else%
  449.     \ifx\ccc\empty%%
  450.      \put(171,103){\line(0,1){150}}%       %bond 3-2
  451.     \else%
  452.      \put(171,143){\line(0,1){110}}%       %bond 3-2
  453.     \fi%
  454.   \fi}%
  455. %bond between 5 and 6
  456. \def\skbonde{%
  457.   \ifx\eee\empty%
  458.     \ifx\fff\empty%
  459.      \put(-171,103){\line(0,1){200}}%       %bond 5-6
  460.     \else%
  461.      \put(-171,103){\line(0,1){150}}%       %bond 5-6
  462.     \fi%
  463.   \else%
  464.     \ifx\fff\empty%
  465.      \put(-171,143){\line(0,1){160}}%       %bond 5-6
  466.     \else%
  467.      \put(-171,143){\line(0,1){110}}%       %bond 5-6
  468.     \fi%
  469.   \fi}%
  470. %horizontal bond for five-membered rings
  471. \def\skbondhoriz{%
  472.   \ifx\fff\empty%
  473.     \ifx\bbb\empty%
  474.      \put(-171,303){\line(1,0){342}}%      %bond 4-3
  475.     \else%
  476.      \put(-171,303){\line(1,0){300}}%      %bond 4-3
  477.     \fi%
  478.   \else%
  479.     \ifx\bbb\empty%
  480.      \put(171,303){\line(-1,0){300}}%      %bond 4-3
  481.     \else%
  482.      \put(-129,303){\line(1,0){258}}%      %bond 4-3
  483.     \fi%
  484.   \fi}%
  485. %horizontal bond for five-membered rings (inverse type)
  486. \def\skbondhorizi{%
  487.   \ifx\eee\empty%
  488.     \ifx\ccc\empty%
  489.      \put(-171,103){\line(1,0){342}}%      %bond 4-3
  490.     \else%
  491.      \put(-171,103){\line(1,0){300}}%      %bond 4-3
  492.     \fi%
  493.   \else%
  494.     \ifx\ccc\empty%
  495.      \put(171,103){\line(-1,0){300}}%      %bond 4-3
  496.     \else%
  497.      \put(-129,103){\line(1,0){258}}%      %bond 4-3
  498.     \fi%
  499.   \fi}%
  500. %
  501. % *************************
  502. % * sixhetero derivatives *
  503. % *  (vertical type)      *
  504. % *************************
  505. % The following numbering is adopted in this macro. 
  506. %
  507. %          1
  508. %          * 
  509. %     6  *   *  2
  510. %       |     |
  511. %       |     |
  512. %     5  *   *  3
  513. %          *
  514. %          4 <===== the original point
  515. %
  516. %   \sixheterov[BONDLIST]{ATOMLIST}{SUBSLIST}
  517. %  
  518. %     BONDLIST = 
  519. %
  520. %           none or r  :  sixhetero (right-handed)
  521. %           l          :  sixhetero (left-handed)
  522. %           a          :  1,2-double bond
  523. %           b          :  2,3-double bond
  524. %           c          :  4,3-double bond
  525. %           d          :  4,5-double bond
  526. %           e          :  5,6-double bond
  527. %           f          :  6,1-double bond
  528. %           A          :  aromatic circle 
  529. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  530. %
  531. %     ATOMLIST: list of heteroatoms (max 6 atoms)
  532. %
  533. %       for n = 1 to 6
  534. %
  535. %           n          : Hetero atom, e.g. N, O, etc. at n-position, 
  536. %                        e.g. 1==N for N at 1-position
  537. %
  538. %     SUBSLIST: list of substituents (max 6 substitution positions)
  539. %
  540. %       for n = 1 to 6 
  541. %
  542. %           nD         :  exocyclic double bond at n-atom
  543. %           n or nS    :  exocyclic single bond at n-atom
  544. %           nA         :  alpha single bond at n-atom
  545. %           nB         :  beta single bond at n-atom
  546. %           nSA        :  alpha single bond at n-atom (boldface)
  547. %           nSB        :  beta single bond at n-atom (dotted line)
  548. %           nSa        :  alpha (not specified) single bond at n-atom
  549. %           nSb        :  beta (not specified) single bond at n-atom
  550. %
  551. %       e.g. 
  552. %        
  553. %        \sixheterov{1==N}{1==Cl;2==F}
  554. %        \sixheterov[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  555. %        \sixheterov[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
  556. %
  557. \def\sixheterov{\@ifnextchar[{\@sixheterov}{\@sixheterov[r]}}
  558. \def\@sixheterov[#1]#2#3{%
  559. %%%%%%%%%%%%%%%%%%%%%%%%%%
  560. % treatment of atom list %
  561. %%%%%%%%%%%%%%%%%%%%%%%%%%
  562. \iniatom\iniflag%initialize
  563. \@forsemicol\member:=#2\do{%
  564. \expandafter\@m@mb@r\member;\relax%
  565. \expandafter\twoch@r\@membera{}%
  566. \ifcase\@tmpa%
  567.  \or \xdef\aaa{\@memberb}%
  568.  \or \xdef\bbb{\@memberb}%
  569.  \or \xdef\ccc{\@memberb}%
  570.  \or \xdef\ddd{\@memberb}%
  571.  \or \xdef\eee{\@memberb}%
  572.  \or \xdef\fff{\@memberb}%
  573. \fi}%
  574.  \begin{picture}(800,880)(-\shiftii,-\shifti)
  575.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  576.            \put(-\noshift,-\noshift){\circle{50}}% 
  577.    \typeout{command `sixheterov' origin: %
  578.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  579. %%%%%%%%%%%%%%%%%%
  580. % outer skeleton %
  581. %%%%%%%%%%%%%%%%%%
  582.  \skbonda% bond between 1 and 2
  583.  \skbondf% bond between 1 and 6
  584.  \skbondc% bond between 4 and 3
  585.  \skbondd% bond between 4 and 5
  586.  \skbondb% bond between 3 and 2
  587.  \skbonde% bond between 5 and 6
  588. %%%%%%%%%%%%%%%%%%%%%
  589. % inner double bond %
  590. %%%%%%%%%%%%%%%%%%%%%
  591. \@tfor\member:=#1\do{%
  592. \if\member r\relax \bondd \bondf \bondb%
  593. \else\if\member l\relax \bonda \bondc \bonde%
  594. \else\if\member a\relax \bonda%
  595. \else\if\member b\relax \bondb%
  596. \else\if\member c\relax \bondc%
  597. \else\if\member d\relax \bondd%
  598. \else\if\member e\relax \bonde%
  599. \else\if\member f\relax \bondf%
  600. \else\if\member A%left aromatic circle 
  601.   \put(0,203){\circle{240}}%               %circle
  602. \else \expandafter\twoch@@r\member{}{}%
  603.       \if\@@tmpa 1\relax%
  604.         \putratom{-38}{282}{\@@tmpb}%      % right type
  605.       \else\if\@@tmpa 2\relax%
  606.         \putratom{60}{253}{\@@tmpb}%       % right type
  607.       \else\if\@@tmpa 3\relax%
  608.         \putratom{60}{120}{\@@tmpb}%       % right type
  609.       \else\if\@@tmpa 4\relax%
  610.         \putratom{-38}{88}{\@@tmpb}%       % right type
  611.       \else\if\@@tmpa 6\relax%
  612.         \putratom{-90}{253}{\@@tmpb}%      % right type
  613.       \else\if\@@tmpa 5\relax%
  614.         \putratom{-90}{120}{\@@tmpb}%      % right type
  615.       \fi\fi\fi\fi\fi\fi%
  616. \fi\fi\fi\fi\fi\fi\fi\fi\fi%
  617. }%
  618. %%%%%%%%%%%%%%%%%%%%%%%%
  619. % setting hetero atoms %
  620. %%%%%%%%%%%%%%%%%%%%%%%%
  621. \ifx\ddd\empty\else%
  622.    \@cliptrue% 
  623.    \putratom{-31}{-10}{\ddd}%  % right type
  624. \fi%
  625. \ifx\aaa\empty\else%
  626.      \@acliptrue%
  627.      \putratom{-31}{356}{\aaa}%  % right type
  628. \fi%
  629. \ifx\bbb\empty\else%
  630.      \@bcliptrue%
  631.      \putratom{135}{280}{\bbb}%  % right type
  632. \fi%
  633. \ifx\ccc\empty\else%
  634.      \@ccliptrue%
  635.      \putratom{135}{65}{\ccc}%   % right type
  636. \fi%
  637. \ifx\fff\empty\else%
  638.      \@fcliptrue%
  639.      \putlatom{-135}{280}{\fff}% % left type
  640. \fi%
  641. \ifx\eee\empty\else%
  642.      \@ecliptrue%
  643.      \putlatom{-135}{65}{\eee}%  % left type
  644. \fi%
  645. \setsixringv{#3}{0}{0}{7}{0}%    %subst 1--6
  646. \end{picture}\iniatom\iniflag}%     %end of \sixheterov macro
  647. %
  648. % **********************************
  649. % * sixhetero derivatives          *
  650. % *  (vertical type, inverse type) *
  651. % **********************************
  652. % The following numbering is adopted in this macro. 
  653. %
  654. %          4
  655. %          * 
  656. %     5  *   *  3
  657. %       |     |
  658. %       |     |
  659. %     6  *   *  2
  660. %          *
  661. %          1 <===== the original point
  662. %
  663. %   \sixheterovi[BONDLIST]{ATOMLIST}{SUBSLIST}
  664. %  
  665. %     BONDLIST = 
  666. %
  667. %           none or r  :  sixhetero (right-handed)
  668. %           l          :  sixhetero (left-handed)
  669. %           [] or H    :  fully saturated form
  670. %           a          :  1,2-double bond
  671. %           b          :  2,3-double bond
  672. %           c          :  4,3-double bond
  673. %           d          :  4,5-double bond
  674. %           e          :  5,6-double bond
  675. %           f          :  6,1-double bond
  676. %           A          :  aromatic circle 
  677. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  678. %
  679. %     ATOMLIST: list of heteroatoms (max 6 atoms)
  680. %
  681. %       for n = 1 to 6
  682. %
  683. %           n          : Hetero atom, e.g. N, O, etc. at n-position, 
  684. %                        e.g. 1==N for N at 1-position
  685. %
  686. %     SUBSLIST: list of substituents (max 6 substitution positions)
  687. %
  688. %       for n = 1 to 6 
  689. %
  690. %           nD         :  exocyclic double bond at n-atom
  691. %           n or nS    :  exocyclic single bond at n-atom
  692. %           nA         :  alpha single bond at n-atom
  693. %           nB         :  beta single bond at n-atom
  694. %           nSA        :  alpha single bond at n-atom (boldface)
  695. %           nSB        :  beta single bond at n-atom (dotted line)
  696. %           nSa        :  alpha (not specified) single bond at n-atom
  697. %           nSb        :  beta (not specified) single bond at n-atom
  698. %
  699. %       e.g. 
  700. %        
  701. %        \sixheterovi{1==N}{1==Cl;2==F}
  702. %        \sixheterovi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  703. %        \sixheterovi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
  704. %
  705. \def\sixheterovi{\@ifnextchar[{\@sixheterovi}{\@sixheterovi[r]}}
  706. \def\@sixheterovi[#1]#2#3{%
  707. %%%%%%%%%%%%%%%%%%%%%%%%%%
  708. % treatment of atom list %
  709. %%%%%%%%%%%%%%%%%%%%%%%%%%
  710. \iniatom\iniflag%initialize
  711. \@forsemicol\member:=#2\do{%
  712. \expandafter\@m@mb@r\member;\relax%
  713. \expandafter\twoch@r\@membera{}%
  714. \ifcase\@tmpa%
  715.  \or \xdef\ddd{\@memberb}%
  716.  \or \xdef\ccc{\@memberb}%
  717.  \or \xdef\bbb{\@memberb}%
  718.  \or \xdef\aaa{\@memberb}%
  719.  \or \xdef\fff{\@memberb}%
  720.  \or \xdef\eee{\@memberb}%
  721. \fi}%
  722.  \begin{picture}(800,880)(-\shiftii,-\shifti)
  723.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  724.            \put(-\noshift,-\noshift){\circle{50}}% 
  725.    \typeout{command `sixheterovi' origin: %
  726.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  727. %%%%%%%%%%%%%%%%%%
  728. % outer skeleton %
  729. %%%%%%%%%%%%%%%%%%
  730.  \skbonda% bond between 4 and 3
  731.  \skbondf% bond between 4 and 5
  732.  \skbondc% bond between 1 and 2
  733.  \skbondd% bond between 1 and 6
  734.  \skbondb% bond between 3 and 2
  735.  \skbonde% bond between 5 and 6
  736. %%%%%%%%%%%%%%%%%%%%%
  737. % inner double bond %
  738. %%%%%%%%%%%%%%%%%%%%%
  739. \@tfor\member:=#1\do{%
  740. \if\member r\relax \bondd \bondf \bondb%
  741. \else\if\member l\relax \bonda \bondc \bonde%
  742. \else\if\member a\relax \bondc%
  743. \else\if\member b\relax \bondb%
  744. \else\if\member c\relax \bonda%
  745. \else\if\member d\relax \bondf%
  746. \else\if\member e\relax \bonde%
  747. \else\if\member f\relax \bondd%
  748. \else\if\member A%left aromatic circle 
  749.   \put(0,203){\circle{240}}%               %circle
  750. \else \expandafter\twoch@@r\member{}{}%
  751.       \if\@@tmpa 4\relax%
  752.         \putratom{-38}{282}{\@@tmpb}%      % right type
  753.       \else\if\@@tmpa 3\relax%
  754.         \putratom{60}{253}{\@@tmpb}%       % right type
  755.       \else\if\@@tmpa 2\relax%
  756.         \putratom{60}{120}{\@@tmpb}%       % right type
  757.       \else\if\@@tmpa 1\relax%
  758.         \putratom{-38}{88}{\@@tmpb}%       % right type
  759.       \else\if\@@tmpa 5\relax%
  760.         \putratom{-90}{253}{\@@tmpb}%      % right type
  761.       \else\if\@@tmpa 6\relax%
  762.         \putratom{-90}{120}{\@@tmpb}%      % right type
  763.       \fi\fi\fi\fi\fi\fi%
  764. \fi\fi\fi\fi\fi\fi\fi\fi\fi%
  765. }%
  766. %%%%%%%%%%%%%%%%%%%%%%%%
  767. % setting hetero atoms %
  768. %%%%%%%%%%%%%%%%%%%%%%%%
  769. \ifx\ddd\empty\else%
  770.    \@cliptrue% 
  771.    \putratom{-31}{-10}{\ddd}%  % right type
  772. \fi%
  773. \ifx\aaa\empty\else%
  774.      \@acliptrue%
  775.      \putratom{-31}{356}{\aaa}%  % right type
  776. \fi%
  777. \ifx\bbb\empty\else%
  778.      \@bcliptrue%
  779.      \putratom{135}{280}{\bbb}%  % right type
  780. \fi%
  781. \ifx\ccc\empty\else%
  782.      \@ccliptrue%
  783.      \putratom{135}{65}{\ccc}%   % right type
  784. \fi%
  785. \ifx\fff\empty\else%
  786.      \@fcliptrue%
  787.      \putlatom{-135}{280}{\fff}% % left type
  788. \fi%
  789. \ifx\eee\empty\else%
  790.      \@ecliptrue%
  791.      \putlatom{-135}{65}{\eee}%  % left type
  792. \fi%
  793. \setsixringv{#3}{5}{0}{5}{-1}%    %subst 1--4
  794. \setsixringv{#3}{11}{4}{7}{-1}%   %subst 5 and 6
  795. \end{picture}\iniatom\iniflag}%     %end of \sixheterovi macro
  796. %
  797. % ************************
  798. % * pyridine derivatives *
  799. % *  (vertical type)     *
  800. % ************************
  801. %
  802. %   \pyridinev[BONDLIST]{SUBSLIST}
  803. %   \pyridinevi[BONDLIST]{SUBSLIST}
  804. %   \pyrazinev[BONDLIST]{SUBSLIST}
  805. %   \pyrimidinev[BONDLIST]{SUBSLIST}
  806. %   \pyrimidinevi[BONDLIST]{SUBSLIST}
  807. %   \triazinev[BONDLIST]{SUBSLIST}
  808. %   \triazinevi[BONDLIST]{SUBSLIST}
  809. %
  810. %     BONDLIST = 
  811. %
  812. %           none or r  :  pyridine (right-handed)
  813. %           l          :  pyridine (left-handed)
  814. %           H or []    :  fully saturated ring
  815. %           a          :  1,2-double bond
  816. %           b          :  2,3-double bond
  817. %           c          :  4,3-double bond
  818. %           d          :  4,5-double bond
  819. %           e          :  5,6-double bond
  820. %           f          :  6,1-double bond
  821. %           A          :  aromatic circle 
  822. %           *          :  plus at the nitrogen atom
  823. %
  824. %     SUBSLIST: list of substituents (max 6 substitution positions)
  825. %
  826. %       for n = 1 to 6 
  827. %
  828. %           nD         :  exocyclic double bond at n-atom
  829. %           n or nS    :  exocyclic single bond at n-atom
  830. %           nA         :  alpha single bond at n-atom
  831. %           nB         :  beta single bond at n-atom
  832. %           nSA        :  alpha single bond at n-atom (boldface)
  833. %           nSB        :  beta single bond at n-atom (dotted line)
  834. %           nSa        :  alpha (not specified) single bond at n-atom
  835. %           nSb        :  beta (not specified) single bond at n-atom
  836. %
  837. %       e.g. 
  838. %        
  839. %        \pyridinev{1==Cl;2==F}
  840. %        \pyridinev[c]{1==Cl;4==F;2==CH$_{3}$}
  841. %        \pyridinev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  842. %
  843. \def\pyridinev{\@ifnextchar[{\@pyridinev}{\@pyridinev[r]}}
  844. \def\@pyridinev[#1]#2{%
  845. \iforigpt \typeout{command `pyridinev' is based on `sixheterov'.}\fi%
  846. \sixheterov[#1]{1==N}{#2}} %end of \pyridinev macro
  847. \def\pyridinevi{\@ifnextchar[{\@pyridinevi}{\@pyridinevi[r]}}
  848. \def\@pyridinevi[#1]#2{%
  849. \iforigpt \typeout{command `pyridinevi' is based on `sixheterovi'.}\fi%
  850. \sixheterovi[#1]{1==N}{#2}} %end of \pyridinevi macro
  851. %
  852. \def\pyrazinev{\@ifnextchar[{\@pyrazinev}{\@pyrazinev[r]}}
  853. \def\@pyrazinev[#1]#2{%
  854. \iforigpt \typeout{command `pyrazinev' is based on `sixheterov'.}\fi%
  855. \sixheterov[#1]{1==N;4==N}{#2}}%end of \pyrazinev macro
  856. %
  857. \def\pyrimidinev{\@ifnextchar[{\@pyrimidinev}{\@pyrimidinev[r]}}
  858. \def\@pyrimidinev[#1]#2{%
  859. \iforigpt \typeout{command `pyrimidinev' is based on `sixheterov'.}\fi%
  860. \sixheterov[#1]{1==N;3==N}{#2}} 
  861.    %end of \pyrimidinev macro
  862. \def\pyrimidinevi{\@ifnextchar[{\@pyrimidinevi}{\@pyrimidinevi[r]}}
  863. \def\@pyrimidinevi[#1]#2{%
  864. \iforigpt \typeout{command `pyrimidinevi' is based on `sixheterovi'.}\fi%
  865. \sixheterovi[#1]{1==N;3==N}{#2}} 
  866.    %end of \pyrimidinevi macro
  867. %
  868. \def\pyridazinev{\@ifnextchar[{\@pyridazinev}{\@pyridazinev[r]}}
  869. \def\@pyridazinev[#1]#2{%
  870. \iforigpt \typeout{command `pyridazinev' is based on `sixheterov'.}\fi%
  871. \sixheterov[#1]{1==N;2==N}{#2}} 
  872.    %end of \pyridazinev macro
  873. \def\pyridazinevi{\@ifnextchar[{\@pyridazinevi}{\@pyridazinevi[r]}}
  874. \def\@pyridazinevi[#1]#2{%
  875. \iforigpt \typeout{command `pyridazinev' is based on `sixheterovi'.}\fi%
  876. \sixheterovi[#1]{1==N;2==N}{#2}} 
  877.    %end of \pyridazinevi macro
  878. %
  879. \def\triazinev{\@ifnextchar[{\@triazinev}{\@triazinev[r]}}
  880. \def\@triazinev[#1]#2{%
  881. \iforigpt \typeout{command `triazinev' is based on `sixheterov'.}\fi%
  882. \sixheterov[#1]{1==N;3==N;5==N}{#2}} 
  883.    %end of \triazinev macro
  884. %
  885. \def\triazinevi{\@ifnextchar[{\@triazinevi}{\@triazinevi[r]}}
  886. \def\@triazinevi[#1]#2{%
  887. \iforigpt \typeout{command `triazinevi' is based on `sixheterovi'.}\fi%
  888. \sixheterovi[#1]{1==N;3==N;5==N}{#2}} 
  889.    %end of \triazinevi macro
  890. %
  891. % **************************
  892. % * fivehetero derivatives *
  893. % *  (vertical type)       *
  894. % **************************
  895. % The following numbering is adopted in this macro. 
  896. %
  897. %     4  _____  3
  898. %       |     |
  899. %       |     |
  900. %     5  *   *  2
  901. %          *
  902. %          1 <===== the original point
  903. %
  904. %   \fiveheterov[BONDLIST]{ATOMLIST}{SUBSLIST}
  905. %  
  906. %     BONDLIST: list of inner double bonds 
  907. %
  908. %           a          :  1,2-double bond
  909. %           b          :  2,3-double bond
  910. %           c          :  4,3-double bond
  911. %           d          :  4,5-double bond
  912. %           e          :  5,1-double bond
  913. %           A          :  aromatic circle
  914. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 5)
  915. %           {0+}       :  plus (or minus) at the center
  916. %
  917. %     ATOMLIST: list of heteroatoms (max 5 atoms)
  918. %
  919. %       for n = 1 to 5
  920. %
  921. %           n          : Hetero atom, e.g. N, O, etc. at n-position
  922. %                        e.g. 1==N for N at 1-position
  923. %
  924. %     SUBSLIST: list of substituents (max 5 substitution positions)
  925. %
  926. %       for n = 1 to 5 
  927. %
  928. %           nD         :  exocyclic double bond at n-atom
  929. %           n or nS    :  exocyclic single bond at n-atom
  930. %           nA         :  alpha single bond at n-atom
  931. %           nB         :  beta single bond at n-atom
  932. %           nSA        :  alpha single bond at n-atom (boldface)
  933. %           nSB        :  beta single bond at n-atom (dotted line)
  934. %           nSa        :  alpha (not specified) single bond at n-atom
  935. %           nSb        :  beta (not specified) single bond at n-atom
  936. %
  937. %       e.g. 
  938. %        
  939. %        \fiveheterov{1==N}{1==H;2==F}
  940. %        \fiveheterov[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  941. %        \fiveheterov[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  942. %
  943. \def\fiveheterov{\@ifnextchar[{\@fiveheterov}{\@fiveheterov[r]}}
  944. \def\@fiveheterov[#1]#2#3{%
  945. \iniatom\iniflag%initialize
  946. %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
  947. \@forsemicol\member:=#2\do{%
  948. \expandafter\@m@mb@r\member;\relax%
  949. \expandafter\twoch@r\@membera{}%
  950. \ifcase\@tmpa%
  951.  \or \xdef\ddd{\@memberb}%
  952.  \or \xdef\ccc{\@memberb}%
  953.  \or \xdef\bbb{\@memberb}%
  954.  \or \xdef\fff{\@memberb}%
  955.  \or \xdef\eee{\@memberb}%
  956. \fi}%
  957. \begin{picture}(800,880)(-\shiftii,-\shifti)%
  958.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  959.            \put(-\noshift,-\noshift){\circle{50}}% 
  960.    \typeout{command `fiveheterov' origin: %
  961.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  962. %%%%%%%%%%%%%%%%%%
  963. % outer skeleton %
  964. %%%%%%%%%%%%%%%%%%
  965. \skbondc%bond between 1 and 2
  966. \skbondd%bond between 1 and 5
  967. \skbondb%bond between 2 to 3
  968. \skbonde%bond between 5 and 4
  969. \skbondhoriz%bond between 4 and 3
  970. %%%%%%%%%%%%%%%%%%%%%
  971. % inner double bond %
  972. %%%%%%%%%%%%%%%%%%%%%
  973. \@tfor\member:=#1\do{%
  974. \if\member r%
  975. \else\if\member a\relax \bondc%
  976. \else\if\member b\relax \bondb%
  977. \else\if\member c\relax \bondhoriz%
  978. \else\if\member d\relax \bonde%
  979. \else\if\member e\relax \bondd%
  980. \else\if\member A\relax%
  981.  \put(0,173){\circle{180}}%aromatic circle
  982. \else \expandafter\twoch@@r\member{}{}%     %plus or minus charges
  983.       \if\@@tmpa 1\relax%
  984.         \putratom{-38}{88}{\@@tmpb}%        % right type
  985.       \else\if\@@tmpa 2\relax%
  986.         \putratom{60}{120}{\@@tmpb}%        % right type
  987.       \else\if\@@tmpa 3\relax%
  988.         \putratom{60}{233}{\@@tmpb}%        % right type
  989.       \else\if\@@tmpa 4\relax%
  990.         \putratom{-60}{233}{\@@tmpb}%       % right type
  991.       \else\if\@@tmpa 5\relax%
  992.         \putratom{-60}{120}{\@@tmpb}%       % right type
  993.       \else\if\@@tmpa 0\relax%
  994.         \putratom{-38}{150}{\@@tmpb}%       % right type
  995.       \fi\fi\fi\fi\fi\fi%
  996. \fi\fi\fi\fi\fi\fi\fi}%
  997. %%%%%%%%%%%%%%%%%%%%%%%
  998. % setting heteroatoms %
  999. %%%%%%%%%%%%%%%%%%%%%%%
  1000. \ifx\ddd\empty\else%
  1001.    \@cliptrue% 
  1002.    \putratom{-31}{-10}{\ddd}%    % right type at 1
  1003. \fi%
  1004. \ifx\bbb\empty\else%
  1005.      \@bcliptrue%
  1006.      \putratom{135}{280}{\bbb}%  % right type at 3
  1007. \fi%
  1008. \ifx\fff\empty\else%
  1009.      \@fcliptrue%
  1010.      \putlatom{-135}{280}{\fff}% % left type at 4
  1011. \fi%
  1012. \ifx\ccc\empty\else%
  1013.      \@ccliptrue%
  1014.      \putratom{135}{65}{\ccc}%   % right type at 2
  1015. \fi%
  1016. \ifx\eee\empty\else%
  1017.      \@ecliptrue%
  1018.      \putlatom{-135}{65}{\eee}%  % left type at 5 
  1019. \fi%
  1020. %%%%%%%%%%%%%%%%%%%%%%%%
  1021. % setting substituents %
  1022. %%%%%%%%%%%%%%%%%%%%%%%%
  1023. \setsixringv{#3}{5}{1}{5}{-1}%   % for 1 to 3
  1024. \setsixringv{#3}{10}{4}{7}{-1}%  % for 4 to 5
  1025. \end{picture}\iniatom\iniflag}%             %end of \fiveheterov macro
  1026. %
  1027. % *****************************
  1028. % * fivehetero derivatives    *
  1029. % *  (vertical type, inverse) *
  1030. % *****************************
  1031. % The following numbering is adopted in this macro. 
  1032. %
  1033. %          1
  1034. %          * 
  1035. %     6  *   *  2
  1036. %       |     |
  1037. %       |_____|
  1038. %     4         3
  1039. %          *
  1040. %        (0,0) <===== the original point
  1041. %
  1042. %   \fiveheterovi[BONDLIST]{ATOMLIST}{SUBSLIST}
  1043. %  
  1044. %     BONDLIST: list of inner double bonds 
  1045. %
  1046. %           a          :  1,2-double bond
  1047. %           b          :  2,3-double bond
  1048. %           c          :  4,3-double bond
  1049. %           d          :  4,5-double bond
  1050. %           e          :  5,1-double bond
  1051. %           A          :  aromatic circle
  1052. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 5)
  1053. %           {0+}       :  plus (or minus) at the center
  1054. %
  1055. %     ATOMLIST: list of heteroatoms (max 5 atoms)
  1056. %
  1057. %       for n = 1 to 5
  1058. %
  1059. %           n          : Hetero atom, e.g. N, O, etc. at n-position
  1060. %                        e.g. 1==N for N at 1-position
  1061. %
  1062. %     SUBSLIST: list of substituents (max 5 substitution positions)
  1063. %
  1064. %       for n = 1 to 5 
  1065. %
  1066. %           nD         :  exocyclic double bond at n-atom
  1067. %           n or nS    :  exocyclic single bond at n-atom
  1068. %           nA         :  alpha single bond at n-atom
  1069. %           nB         :  beta single bond at n-atom
  1070. %           nSA        :  alpha single bond at n-atom (boldface)
  1071. %           nSB        :  beta single bond at n-atom (dotted line)
  1072. %           nSa        :  alpha (not specified) single bond at n-atom
  1073. %           nSb        :  beta (not specified) single bond at n-atom
  1074. %
  1075. %       e.g. 
  1076. %        
  1077. %        \fiveheterovi{1==N}{1==H;2==F}
  1078. %        \fiveheterovi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  1079. %        \fiveheterovi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1080. %
  1081. \def\fiveheterovi{\@ifnextchar[{\@fiveheterovi}{\@fiveheterovi[r]}}
  1082. \def\@fiveheterovi[#1]#2#3{%
  1083. \iniatom\iniflag%initialize
  1084. \@forsemicol\member:=#2\do{%
  1085. \expandafter\@m@mb@r\member;\relax%
  1086. \expandafter\twoch@r\@membera{}%
  1087. \ifcase\@tmpa%
  1088.  \or \xdef\aaa{\@memberb}%
  1089.  \or \xdef\bbb{\@memberb}%
  1090.  \or \xdef\ccc{\@memberb}%
  1091.  \or \xdef\eee{\@memberb}%
  1092.  \or \xdef\fff{\@memberb}%
  1093. \fi}%
  1094. \begin{picture}(800,880)(-\shiftii,-\shifti)%
  1095.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  1096.            \put(-\noshift,-\noshift){\circle{50}}% 
  1097.    \typeout{command `fiveheterovi' origin: %
  1098.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  1099. %%%%%%%%%%%%%%%%%%
  1100. % outer skeleton %
  1101. %%%%%%%%%%%%%%%%%%
  1102. \skbonda%bond between 1 and 2
  1103. \skbondb%bond between 2 and 3
  1104. \skbonde%bond between 4 and 5
  1105. \skbondf%bond between 1 and 5
  1106. \skbondhorizi% bond between 3 and 4
  1107. %%%%%%%%%%%%%%%%%%%%%
  1108. % inner double bond %
  1109. %%%%%%%%%%%%%%%%%%%%%
  1110. \@tfor\member:=#1\do{%
  1111. \if\member r%
  1112. \else\if\member a\relax \bonda%
  1113. \else\if\member b\relax \bondb%
  1114. \else\if\member c\relax \bondhorizi%
  1115. \else\if\member d\relax \bonde%
  1116. \else\if\member e\relax \bondf%
  1117. \else\if\member A\relax%
  1118.  \put(0,233){\circle{180}}%aromatic circle
  1119. \else \expandafter\twoch@@r\member{}{}%     %plus or minus charges
  1120.       \if\@@tmpa 1\relax%
  1121.         \putratom{-38}{282}{\@@tmpb}%      % right type
  1122.       \else\if\@@tmpa 2\relax%
  1123.         \putratom{60}{233}{\@@tmpb}%        % right type
  1124.       \else\if\@@tmpa 3\relax%
  1125.         \putratom{60}{120}{\@@tmpb}%        % right type
  1126.       \else\if\@@tmpa 4\relax%
  1127.         \putratom{-60}{120}{\@@tmpb}%       % right type
  1128.       \else\if\@@tmpa 5\relax%
  1129.         \putratom{-60}{233}{\@@tmpb}%       % right type
  1130.       \else\if\@@tmpa 0\relax%
  1131.         \putratom{-38}{213}{\@@tmpb}%       % right type
  1132.       \fi\fi\fi\fi\fi\fi%
  1133. \fi\fi\fi\fi\fi\fi\fi}%
  1134. %%%%%%%%%%%%%%%%%%%%%%%
  1135. % setting heteroatoms %
  1136. %%%%%%%%%%%%%%%%%%%%%%%
  1137. \ifx\aaa\empty\else%
  1138.      \@acliptrue%
  1139.      \putratom{-31}{356}{\aaa}%  % right type  at 1
  1140. \fi%
  1141. \ifx\bbb\empty\else%
  1142.      \@bcliptrue%
  1143.      \putratom{135}{280}{\bbb}%  % right type at 2
  1144. \fi%
  1145. \ifx\fff\empty\else%
  1146.      \@fcliptrue%
  1147.      \putlatom{-135}{280}{\fff}% % left type at 5
  1148. \fi%
  1149. \ifx\ccc\empty\else%
  1150.      \@ccliptrue%
  1151.      \putratom{135}{65}{\ccc}%   % right type at 3
  1152. \fi%
  1153. \ifx\eee\empty\else%
  1154.      \@ecliptrue%
  1155.      \putlatom{-135}{65}{\eee}%  % left type at 4 
  1156. \fi%
  1157. %%%%%%%%%%%%%%%%%%%%%%%%
  1158. % setting substituents %
  1159. %%%%%%%%%%%%%%%%%%%%%%%%
  1160. \setsixringv{#3}{0}{0}{4}{0}%  % for 1 to 3
  1161. \setsixringv{#3}{1}{4}{7}{0}%  % for 4 to 5
  1162. \end{picture}\iniatom\iniflag}               %end of \fiveheterov macro
  1163. %
  1164. % ***********************************
  1165. % * pyrrole derivatives  and others *
  1166. % *  (vertical type)                *
  1167. % ***********************************
  1168. %
  1169. %   \pyrrolev[BONDLIST]{SUBSLIST}
  1170. %   \pyrazolev[BONDLIST]{SUBSLIST}
  1171. %   \imidazolev[BONDLIST]{SUBSLIST}
  1172. %   \isoxazolev[BONDLIST]{SUBSLIST}
  1173. %   \oxazolev[BONDLIST]{SUBSLIST}
  1174. %  
  1175. %     BONDLIST: list of inner double bonds 
  1176. %
  1177. %           none       :  mother nucleus
  1178. %           H or []    :  fully saturated form
  1179. %           a          :  1,2-double bond
  1180. %           b          :  2,3-double bond
  1181. %           c          :  4,3-double bond
  1182. %           d          :  4,5-double bond
  1183. %           e          :  5,1-double bond
  1184. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1185. %
  1186. %     SUBSLIST: list of substituents (max 6 substitution positions)
  1187. %
  1188. %       for n = 1 to 5 
  1189. %
  1190. %           nD         :  exocyclic double bond at n-atom
  1191. %           n or nS    :  exocyclic single bond at n-atom
  1192. %           nA         :  alpha single bond at n-atom
  1193. %           nB         :  beta single bond at n-atom
  1194. %           nSA        :  alpha single bond at n-atom (boldface)
  1195. %           nSB        :  beta single bond at n-atom (dotted line)
  1196. %           nSa        :  alpha (not specified) single bond at n-atom
  1197. %           nSb        :  beta (not specified) single bond at n-atom
  1198. %
  1199. %       e.g. 
  1200. %        
  1201. %        \pyrrolev{1==H;2==F}
  1202. %        \pyrrolev[]{1==H;2==F}
  1203. %        \pyrrolev[H]{1==H;2==F}
  1204. %        \imidazolev[c]{1==Cl;4==F;2==CH$_{3}$}
  1205. %        \isoxazolev[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1206. %
  1207. \def\pyrrolev{\@ifnextchar[{\@pyrrolev}{\@pyrrolev[bd]}}
  1208. \def\@pyrrolev[#1]#2{%
  1209. %\iforigpt \typeout{command `pyrrolev' is based on `fiveheterov'.}\fi%
  1210. \fiveheterov[#1]{1==N}{#2}}
  1211. \def\pyrazolev{\@ifnextchar[{\@pyrazolev}{\@pyrazolev[bd]}}
  1212. \def\@pyrazolev[#1]#2{%
  1213. %\iforigpt \typeout{command `pyrazolev' is based on `fiveheterov'.}\fi%
  1214. \fiveheterov[#1]{1==N;2==N}{#2}}
  1215. \def\imidazolev{\@ifnextchar[{\@imidazolev}{\@imidazolev[bd]}}
  1216. \def\@imidazolev[#1]#2{%
  1217. %\iforigpt \typeout{command `imidazolev' is based on `fiveheterov'.}\fi%
  1218. \fiveheterov[#1]{1==N;3==N}{#2}}
  1219. \def\isoxazolev{\@ifnextchar[{\@isoxazolev}{\@isoxazolev[bd]}}
  1220. \def\@isoxazolev[#1]#2{%
  1221. %\iforigpt \typeout{command `isoxazolev' is based on `fiveheterov'.}\fi%
  1222. \fiveheterov[#1]{1==O;2==N}{#2}}
  1223. \def\oxazolev{\@ifnextchar[{\@oxazolev}{\@oxazolev[bd]}}
  1224. \def\@oxazolev[#1]#2{%
  1225. %\iforigpt \typeout{command `oxazolev' is based on `fiveheterov'.}\fi%
  1226. \fiveheterov[#1]{1==O;3==N}{#2}}
  1227. %
  1228. % ***********************************
  1229. % * pyrrole derivatives  and others *
  1230. % *  (vertical type, inverse)       *
  1231. % ***********************************
  1232. %
  1233. %   \pyrrolevi[BONDLIST]{SUBSLIST}
  1234. %   \pyrazolevi[BONDLIST]{SUBSLIST}
  1235. %   \imidazolevi[BONDLIST]{SUBSLIST}
  1236. %   \isoxazolevi[BONDLIST]{SUBSLIST}
  1237. %   \oxazolevi[BONDLIST]{SUBSLIST}
  1238. %  
  1239. %     BONDLIST: list of inner double bonds 
  1240. %
  1241. %           none       :  mother nucleus
  1242. %           H or []    :  fully saturated form
  1243. %           a          :  1,2-double bond
  1244. %           b          :  2,3-double bond
  1245. %           c          :  4,3-double bond
  1246. %           d          :  4,5-double bond
  1247. %           e          :  5,1-double bond
  1248. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1249. %
  1250. %     SUBSLIST: list of substituents (max 6 substitution positions)
  1251. %
  1252. %       for n = 1 to 5 
  1253. %
  1254. %           nD         :  exocyclic double bond at n-atom
  1255. %           n or nS    :  exocyclic single bond at n-atom
  1256. %           nA         :  alpha single bond at n-atom
  1257. %           nB         :  beta single bond at n-atom
  1258. %           nSA        :  alpha single bond at n-atom (boldface)
  1259. %           nSB        :  beta single bond at n-atom (dotted line)
  1260. %           nSa        :  alpha (not specified) single bond at n-atom
  1261. %           nSb        :  beta (not specified) single bond at n-atom
  1262. %
  1263. %       e.g. 
  1264. %        
  1265. %        \pyrrolevi{1==H;2==F}
  1266. %        \pyrrolevi[]{1==H;2==F}
  1267. %        \pyrrolevi[H]{1==H;2==F}
  1268. %        \imidazolevi[c]{1==Cl;4==F;2==CH$_{3}$}
  1269. %        \isoxazolevi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1270. %
  1271. \def\pyrrolevi{\@ifnextchar[{\@pyrrolevi}{\@pyrrolevi[bd]}}
  1272. \def\@pyrrolevi[#1]#2{%
  1273. %\iforigpt \typeout{command `pyrrolevi' is based on `fiveheterovi'.}\fi%
  1274. \fiveheterovi[#1]{1==N}{#2}}
  1275. \def\pyrazolevi{\@ifnextchar[{\@pyrazolevi}{\@pyrazolevi[bd]}}
  1276. \def\@pyrazolevi[#1]#2{%
  1277. %\iforigpt \typeout{command `pyrazolevi' is based on `fiveheterovi'.}\fi%
  1278. \fiveheterovi[#1]{1==N;2==N}{#2}}
  1279. \def\imidazolevi{\@ifnextchar[{\@imidazolevi}{\@imidazolevi[bd]}}
  1280. \def\@imidazolevi[#1]#2{%
  1281. %\iforigpt \typeout{command `imidazolevi' is based on `fiveheterovi'.}\fi%
  1282. \fiveheterovi[#1]{1==N;3==N}{#2}}
  1283. \def\isoxazolevi{\@ifnextchar[{\@isoxazolevi}{\@isoxazolevi[bd]}}
  1284. \def\@isoxazolevi[#1]#2{%
  1285. %\iforigpt \typeout{command `isoxazolevi' is based on `fiveheterovi'.}\fi%
  1286. \fiveheterovi[#1]{1==O;2==N}{#2}}
  1287. \def\oxazolevi{\@ifnextchar[{\@oxazolevi}{\@oxazolevi[bd]}}
  1288. \def\@oxazolevi[#1]#2{%
  1289. %\iforigpt \typeout{command `oxazolevi' is based on `fiveheterovi'.}\fi%
  1290. \fiveheterovi[#1]{1==O;3==N}{#2}}
  1291. %
  1292. % **************************
  1293. % * decahetero derivatives *
  1294. % *  (vertical type)       *
  1295. % **************************
  1296. % The following numbering is adopted in this macro. 
  1297. %
  1298. %          8 (10)1
  1299. %          *  8a *
  1300. %     7  *   * *   *  2
  1301. %       |     |     |
  1302. %       |     |     |
  1303. %     6  *   * *   *  3
  1304. %          *  4a *
  1305. %          5 (9) 4
  1306. %          ^
  1307. %          |
  1308. %          the original point
  1309. %
  1310. %   \decaheterov[BONDLIST]{ATOMLIST}{SUBSLIST}
  1311. %  
  1312. %     BONDLIST:  list of bonds 
  1313. %
  1314. %           none or r  :  decahetero (right-handed)
  1315. %           l          :  decahetero (left-handed)
  1316. %           H or []    :  fully saturated form
  1317. %           a    :  1,2-double bond      b    :  2,3-double bond
  1318. %           c    :  4,3-double bond      d    :  4,4a-double bond
  1319. %           e    :  4a,5-double bond     f    :  5,6-double bond
  1320. %           g    :  6,7-double bond      h    :  7,8-double bond
  1321. %           i    :  8,8a-double bond     j    :  1,8a-double bond
  1322. %           k    :  4a,8a-double bond
  1323. %           A    :  aromatic circle      B    :  aromatic circle
  1324. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1325. %
  1326. %     ATOMLIST: list of heteroatoms (max 10 atoms)
  1327. %
  1328. %       for n = 1 to 8
  1329. %
  1330. %            n         : Hetero atom, e.g. N, O, etc. at n-position
  1331. %                        e.g. 1==N for N at 1-position
  1332. %            na        : Hetero atom at 4a or 8b (n=4 or 8)
  1333. %                        e.g. 4a==N (or 9==N) for N at 4a-position
  1334. %                             8a==N (or {{10}}==N) for N at 8a-position
  1335. %
  1336. %     SUBSLIST: list of substituents (max 8 substitution positions)
  1337. %
  1338. %       for n = 1 to 8
  1339. %
  1340. %           nD         :  exocyclic double bond at n-atom
  1341. %           n or nS    :  exocyclic single bond at n-atom
  1342. %           nA         :  alpha single bond at n-atom
  1343. %           nB         :  beta single bond at n-atom
  1344. %           nSA        :  alpha single bond at n-atom (boldface)
  1345. %           nSB        :  beta single bond at n-atom (dotted line)
  1346. %           nSa        :  alpha (not specified) single bond at n-atom
  1347. %           nSb        :  beta (not specified) single bond at n-atom
  1348. %
  1349. %       for 9 (4a position) and 10 (8a position)
  1350. %
  1351. %           nD         :  exocyclic double bond at n-atom
  1352. %           n or nS    :  exocyclic single bond at n-atom
  1353. %           nA         :  alpha single bond at n-atom
  1354. %           nB         :  beta single bond at n-atom
  1355. %
  1356. %       e.g. 
  1357. %        
  1358. %        \decaheterov{1==N}{1==Cl;2==F}
  1359. %        \decaheterov[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  1360. %        \decaheterov[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1361. %
  1362. \def\decaheterov{\@ifnextchar[{\@decaheterov}{\@decaheterov[r]}}
  1363. \def\@decaheterov[#1]#2#3{%
  1364. %%%%%%%%%%%%%%%%%%%%%%%%%%
  1365. % treatment of atom list %
  1366. %%%%%%%%%%%%%%%%%%%%%%%%%%
  1367. \iniflag\iniatom%
  1368. \@forsemicol\member:=#2\do{%
  1369. \expandafter\@m@mb@r\member;\relax%
  1370. \expandafter\twoch@r\@membera{}%
  1371. \ifcase\@tmpa%
  1372.  \or \xdef\aaa{\@memberb}%1
  1373.  \or \xdef\bbb{\@memberb}%2
  1374.  \or \xdef\ccc{\@memberb}%3
  1375.  \or%
  1376.    \if\@tmpb a%
  1377.      \xdef\iii{\@memberb}%4a
  1378.    \else\ifx\@tmpb\empty%
  1379.      \xdef\ddd{\@memberb}%4
  1380.    \fi\fi%
  1381.  \or \xdef\eee{\@memberb}%5
  1382.  \or \xdef\fff{\@memberb}%6
  1383.  \or \xdef\ggg{\@memberb}%7
  1384.  \or%
  1385.    \if\@tmpb a%
  1386.      \xdef\jjj{\@memberb}%8a
  1387.    \else\ifx\@tmpb\empty%
  1388.      \xdef\hhh{\@memberb}%8
  1389.    \fi\fi%
  1390. \or \xdef\iii{\@memberb}%9 (= 4a)
  1391. \or \xdef\jjj{\@memberb}%10 (= 8a)
  1392. \fi}%
  1393.  \begin{picture}(1200,880)(-\shiftii,-\shifti)%
  1394.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  1395.            \put(-\noshift,-\noshift){\circle{50}}% 
  1396.    \typeout{command `decaheterov' origin: %
  1397.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  1398. %%%%%%%%%%%%%%%%%%
  1399. % outer skeleton %
  1400. %%%%%%%%%%%%%%%%%%
  1401. {\let\fff=\jjj \let\eee=\iii%
  1402.  \put(342,0){\skbonda}% bond between 1 and 2
  1403.  \put(342,0){\skbondb}% bond between 3 and 2
  1404.  \put(342,0){\skbondc}% bond between 4 and 3
  1405.  \put(342,0){\skbondf}% bond between 1 and 6
  1406.  \put(342,0){\skbondd}% bond between 4 and 4a
  1407.  \put(342,0){\skbonde}% bond between 4a and 8a
  1408. }%
  1409. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  1410.  \let\ccc=\iii\let\bbb=\jjj%
  1411.  \put(0,0){\skbonda}% bond between 8 and 8a
  1412.  \put(0,0){\skbondc}% bond between 5 and 4a
  1413.  \put(0,0){\skbondf}% bond between 8 and 7
  1414.  \put(0,0){\skbondd}% bond between 5 and 6
  1415.  \put(0,0){\skbonde}% bond between 6 and 7
  1416. }%
  1417. %%%%%%%%%%%%%%%%%%%%%
  1418. % inner double bond %
  1419. %%%%%%%%%%%%%%%%%%%%%
  1420. \@tfor\member:=#1\do{%
  1421. \if\member r\relax%
  1422. {\let\fff=\jjj \let\eee=\iii%
  1423.  \put(342,0){\bonda}% bond between 1 and 2
  1424.  \put(342,0){\bondc}% bond between 3 and 4
  1425. }%
  1426. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  1427.  \let\ccc=\iii\let\bbb=\jjj%
  1428.  \put(0,0){\bondb}% bond between 8a and 4a
  1429.  \put(0,0){\bondf}% bond between 8 and 7
  1430.  \put(0,0){\bondd}% bond between 5 and 6
  1431. }%
  1432. \else\if\member l\relax%
  1433. \else\if\member a\relax%
  1434.  \put(342,0){\bonda}% bond between 1 and 2
  1435. \else\if\member b\relax
  1436.  \put(342,0){\bondb}% bond between 2 and 3
  1437. \else\if\member c\relax
  1438.  \put(342,0){\bondc}% bond between 3 and 4
  1439. \else\if\member d\relax%
  1440. {\let\eee=\iii%
  1441.  \put(342,0){\bondd}% bond between 4 and 4a
  1442. }%
  1443. \else\if\member e\relax%
  1444. {\let\ccc=\iii \let\ddd=\eee%
  1445.  \put(0,0){\bondc}% bond between 5 and 4a
  1446. }%
  1447. \else\if\member f\relax%
  1448. {\let\ddd=\eee \let\eee=\fff%
  1449.  \put(0,0){\bondd}% bond between 5 and 6
  1450. }%
  1451. \else\if\member g\relax%
  1452. {\let\eee=\fff \let\fff=\ggg% 
  1453.  \put(0,0){\bonde}% bond between 6 and 7
  1454. }%
  1455. \else\if\member h\relax%
  1456. {\let\aaa=\hhh \let\fff=\ggg%
  1457.  \put(0,0){\bondf}% bond between 8 and 7
  1458. }%
  1459. \else\if\member i\relax%
  1460. {\let\aaa=\hhh \let\bbb=\jjj%
  1461.  \put(0,0){\bonda}% bond between 8 and 8a
  1462. }%
  1463. \else\if\member j\relax%
  1464. {\let\fff=\jjj%
  1465.  \put(342,0){\bondf}% bond between 1 and 8a
  1466. }%
  1467. \else\if\member k\relax%
  1468. {\let\ccc=\iii\let\bbb=\jjj%
  1469.  \put(0,0){\bondb}% bond between 8a and 4a
  1470. }%
  1471. \else\if\member A%left aromatic circle 
  1472.   \put(0,203){\circle{240}}               %circle
  1473. \else\if\member B%left aromatic circle 
  1474.   \put(342,203){\circle{240}}             %circle
  1475. \else \expandafter\twoch@@r\member{}{}%
  1476.   \def\aax{8a} \def\aay{4a}%
  1477.       \if\@@tmpa 1\relax%                  % plus charge etc.
  1478.         \putratom{304}{282}{\@@tmpb}%      % right type
  1479.       \else\if\@@tmpa 2\relax%
  1480.         \putratom{402}{253}{\@@tmpb}%      % right type
  1481.       \else\if\@@tmpa 3\relax%
  1482.         \putratom{402}{120}{\@@tmpb}%      % right type
  1483.       \else\if\@@tmpa 4\relax%
  1484.         \putratom{304}{68}{\@@tmpb}%       % right type
  1485.       \else\if\@@tmpa 6\relax%
  1486.         \putlatom{-60}{253}{\@@tmpb}%      % left type
  1487.       \else\if\@@tmpa 7\relax%
  1488.         \putlatom{-60}{120}{\@@tmpb}%      % left type
  1489.       \else\if\@@tmpa 8\relax%
  1490.         \putratom{-38}{282}{\@@tmpb}%      % right type
  1491.       \else\if\@@tmpa 10\relax%
  1492.         \putratom{60}{253}{\@@tmpb}%       % right type
  1493.       \else\ifx\@@tmpa\aax\relax%
  1494.         \putratom{60}{253}{\@@tmpb}%       % right type
  1495.       \else\ifx\@@tmpa\aay\relax%
  1496.         \putratom{60}{120}{\@@tmpb}%       % right type
  1497.       \else\if\@@tmpa 9\relax%
  1498.         \putratom{60}{120}{\@@tmpb}%       % right type
  1499.       \else\if\@@tmpa 5\relax%
  1500.         \putratom{-38}{68}{\@@tmpb}%       % right type
  1501.       \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  1502. \fi\fi\fi\fi\fi\fi\fi\fi\fi%
  1503. \fi\fi\fi\fi\fi\fi%
  1504. }%
  1505. %%%%%%%%%%%%%%%%%%%%%%%%
  1506. % setting hetero atoms %
  1507. %%%%%%%%%%%%%%%%%%%%%%%%
  1508. % hetero atom on 1
  1509. \ifx\aaa\empty\else%
  1510.      \@acliptrue%
  1511.      \putratom{311}{356}{\aaa}%  % right type
  1512. \fi%
  1513. % hetero atom on 2
  1514. \ifx\bbb\empty\else%
  1515.      \@bcliptrue%
  1516.      \putratom{477}{280}{\bbb}%  % right type
  1517. \fi%
  1518. % hetero atom on 3
  1519. \ifx\ccc\empty\else%
  1520.      \@ccliptrue%
  1521.      \putratom{477}{65}{\ccc}%   % right type
  1522. \fi%
  1523. % hetero atom on 4
  1524. \ifx\ddd\empty\else%
  1525.    \@cliptrue%
  1526.    \putratom{311}{-10}{\ddd}%  % right type
  1527. \fi%
  1528. % hetero atom on 4a
  1529. {\let\eee=\iii%
  1530. \ifx\eee\empty\else%
  1531.      \global\@icliptrue%
  1532.      \putlatom{207}{65}{\iii}%  % left type
  1533. \fi%
  1534. }%
  1535. % hetero atom on 8a
  1536. {\let\fff=\jjj%
  1537. \ifx\fff\empty\else%
  1538.      \global\@jcliptrue%
  1539.      \putlatom{207}{280}{\jjj}% % left type
  1540. \fi%
  1541. }%
  1542. % hetero atom on 5
  1543. {\let\ddd=\eee%
  1544. \ifx\ddd\empty\else
  1545.    \global\@ecliptrue%
  1546.    \putratom{-31}{-10}{\eee}%  % right type
  1547. \fi%
  1548. }%
  1549. % hetero atom on 6
  1550. {\let\eee=\fff%
  1551. \ifx\eee\empty\else%
  1552.      \global\@fcliptrue%
  1553.      \putlatom{-135}{65}{\fff}%  % left type
  1554. \fi%
  1555. }%
  1556. % hetero atom on 7
  1557. {\let\fff=\ggg%
  1558. \ifx\fff\empty\else%
  1559.      \global\@gcliptrue%
  1560.      \putlatom{-135}{280}{\ggg}% % left type
  1561. \fi%
  1562. }%
  1563. % hetero atom on 8
  1564. {\let\aaa=\hhh%
  1565. \ifx\aaa\empty\else%
  1566.      \global\@hcliptrue%
  1567.      \putratom{-31}{356}{\hhh}%  % right type
  1568. \fi%
  1569. }%
  1570. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1571. % setting substituents and exocyclic bonds %
  1572. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1573. \put(342,0){\setsixringv{#3}{0}{0}{5}{0}}% %substituents on 1 to 4
  1574. {\@clipfalse \if@eclip \@cliptrue \fi%   %substituents on 5 to 7
  1575.  \@eclipfalse \if@fclip \@ecliptrue \fi%
  1576.  \@fclipfalse \if@gclip \@fcliptrue \fi%
  1577. \put(0,0){\setsixringv{#3}{-1}{3}{7}{0}}%
  1578. }%
  1579. {\@aclipfalse \if@hclip \@acliptrue \fi%   %substituent on 8
  1580. \put(0,0){\setsixringv{#3}{-7}{0}{2}{0}}%
  1581. }%
  1582. {\@clipfusefalse \if@iclip \@clipfusetrue \fi%
  1583.  \put(171,103){\setatombond{#3}{-8}{7}}%   %9 %for 4a position
  1584. }%
  1585. {\@clipfusefalse \if@jclip \@clipfusetrue \fi%
  1586.   \put(171,303){\setatombond{#3}{-9}{1}}%  %10 for 8a position
  1587. }%
  1588. \end{picture}\iniatom\iniflag}%               %end of \decaheterov macro
  1589. %
  1590. % **********************************
  1591. % * decahetero derivatives         *
  1592. % *  (vertical type, inverse type) *
  1593. % **********************************
  1594. % The following numbering is adopted in this macro. 
  1595. %
  1596. %          5 (9) 4
  1597. %          *  4a *
  1598. %     6  *   * *   *  3
  1599. %       |     |     |
  1600. %       |     |     |
  1601. %     7  *   * *   *  2
  1602. %          *  8a *
  1603. %          8 (10)1
  1604. %          ^
  1605. %          |
  1606. %          the original point
  1607. %
  1608. %   \decaheterovi[BONDLIST]{ATOMLIST}{SUBSLIST}
  1609. %  
  1610. %     BONDLIST:  list of bonds 
  1611. %
  1612. %           none or r  :  decahetero (right-handed)
  1613. %           l          :  decahetero (left-handed)
  1614. %           H or []    :  fully saturated form
  1615. %           a    :  1,2-double bond      b    :  2,3-double bond
  1616. %           c    :  4,3-double bond      d    :  4,4a-double bond
  1617. %           e    :  4a,5-double bond     f    :  5,6-double bond
  1618. %           g    :  6,7-double bond      h    :  7,8-double bond
  1619. %           i    :  8,8a-double bond     j    :  1,8a-double bond
  1620. %           k    :  4a,8a-double bond
  1621. %           A    :  aromatic circle      B    :  aromatic circle
  1622. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1623. %
  1624. %     ATOMLIST: list of heteroatoms (max 10 atoms)
  1625. %
  1626. %       for n = 1 to 8
  1627. %
  1628. %            n         : Hetero atom, e.g. N, O, etc. at n-position
  1629. %                        e.g. 1==N for N at 1-position
  1630. %            na        : Hetero atom at 4a or 8b (n=4 or 8)
  1631. %                        e.g. 4a==N (or 9==N) for N at 4a-position
  1632. %                             8a==N (or {{10}}==N) for N at 8a-position
  1633. %
  1634. %     SUBSLIST: list of substituents (max 8 substitution positions)
  1635. %
  1636. %       for n = 1 to 8
  1637. %
  1638. %           nD         :  exocyclic double bond at n-atom
  1639. %           n or nS    :  exocyclic single bond at n-atom
  1640. %           nA         :  alpha single bond at n-atom
  1641. %           nB         :  beta single bond at n-atom
  1642. %           nSA        :  alpha single bond at n-atom (boldface)
  1643. %           nSB        :  beta single bond at n-atom (dotted line)
  1644. %           nSa        :  alpha (not specified) single bond at n-atom
  1645. %           nSb        :  beta (not specified) single bond at n-atom
  1646. %
  1647. %       for 9 (4a position) and 10 (8a position)
  1648. %
  1649. %           nD         :  exocyclic double bond at n-atom
  1650. %           n or nS    :  exocyclic single bond at n-atom
  1651. %           nA         :  alpha single bond at n-atom
  1652. %           nB         :  beta single bond at n-atom
  1653. %
  1654. %       e.g. 
  1655. %        
  1656. %        \decaheterovi{1==N}{1==Cl;2==F}
  1657. %        \decaheterovi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  1658. %        \decaheterovi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1659. %
  1660. \def\decaheterovi{\@ifnextchar[{\@decaheterovi}{\@decaheterovi[r]}}
  1661. \def\@decaheterovi[#1]#2#3{%
  1662. %%%%%%%%%%%%%%%%%%%%%%%%%%
  1663. % treatment of atom list %
  1664. %%%%%%%%%%%%%%%%%%%%%%%%%%
  1665. \iniflag\iniatom%
  1666. \@forsemicol\member:=#2\do{%
  1667. \expandafter\@m@mb@r\member;\relax%
  1668. \expandafter\twoch@r\@membera{}%
  1669. \ifcase\@tmpa%
  1670.  \or \xdef\ddd{\@memberb}%1
  1671.  \or \xdef\ccc{\@memberb}%2
  1672.  \or \xdef\bbb{\@memberb}%3
  1673.  \or%
  1674.    \if\@tmpb a%
  1675.      \xdef\jjj{\@memberb}%4a
  1676.    \else\ifx\@tmpb\empty%
  1677.      \xdef\aaa{\@memberb}%4
  1678.    \fi\fi%
  1679.  \or \xdef\hhh{\@memberb}%5
  1680.  \or \xdef\ggg{\@memberb}%6
  1681.  \or \xdef\fff{\@memberb}%7
  1682.  \or%
  1683.    \if\@tmpb a%
  1684.      \xdef\iii{\@memberb}%8a
  1685.    \else\ifx\@tmpb\empty%
  1686.      \xdef\eee{\@memberb}%8
  1687.    \fi\fi%
  1688. \or \xdef\jjj{\@memberb}%9 (= 4a)
  1689. \or \xdef\iii{\@memberb}%10 (= 8a)
  1690. \fi}%
  1691.  \begin{picture}(1200,880)(-\shiftii,-\shifti)%
  1692.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  1693.            \put(-\noshift,-\noshift){\circle{50}}% 
  1694.    \typeout{command `decaheterovi' origin: %
  1695.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  1696. %%%%%%%%%%%%%%%%%%
  1697. % outer skeleton %
  1698. %%%%%%%%%%%%%%%%%%
  1699. {\let\fff=\jjj \let\eee=\iii%
  1700.  \put(342,0){\skbonda}% bond between 1 and 2
  1701.  \put(342,0){\skbondb}% bond between 3 and 2
  1702.  \put(342,0){\skbondc}% bond between 4 and 3
  1703.  \put(342,0){\skbondf}% bond between 1 and 6
  1704.  \put(342,0){\skbondd}% bond between 4 and 4a
  1705.  \put(342,0){\skbonde}% bond between 4a and 8a
  1706. }%
  1707. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  1708.  \let\ccc=\iii\let\bbb=\jjj%
  1709.  \put(0,0){\skbonda}% bond between 8 and 8a
  1710.  \put(0,0){\skbondc}% bond between 5 and 4a
  1711.  \put(0,0){\skbondf}% bond between 8 and 7
  1712.  \put(0,0){\skbondd}% bond between 5 and 6
  1713.  \put(0,0){\skbonde}% bond between 6 and 7
  1714. }%
  1715. %%%%%%%%%%%%%%%%%%%%%
  1716. % inner double bond %
  1717. %%%%%%%%%%%%%%%%%%%%%
  1718. \@tfor\member:=#1\do{%
  1719. \if\member r\relax%
  1720. {\let\fff=\jjj \let\eee=\iii%
  1721.  \put(342,0){\bonda}% bond between 1 and 2
  1722.  \put(342,0){\bondc}% bond between 3 and 4
  1723. }%
  1724. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  1725.  \let\ccc=\iii\let\bbb=\jjj%
  1726.  \put(0,0){\bondb}% bond between 8a and 4a
  1727.  \put(0,0){\bondf}% bond between 8 and 7
  1728.  \put(0,0){\bondd}% bond between 5 and 6
  1729. }%
  1730. \else\if\member l\relax%
  1731. \else\if\member a\relax%
  1732.  \put(342,0){\bondc}% bond between 3 and 4
  1733. \else\if\member b\relax%
  1734.  \put(342,0){\bondb}% bond between 2 and 3
  1735. \else\if\member c\relax%
  1736.  \put(342,0){\bonda}% bond between 1 and 2
  1737. \else\if\member d\relax%
  1738. {\let\fff=\jjj%
  1739.  \put(342,0){\bondf}% bond between 1 and 8a
  1740. }%
  1741. \else\if\member e\relax%
  1742. {\let\aaa=\hhh \let\bbb=\jjj%
  1743.  \put(0,0){\bonda}% bond between 8 and 8a
  1744. }%
  1745. \else\if\member f\relax%
  1746. {\let\aaa=\hhh \let\fff=\ggg%
  1747.  \put(0,0){\bondf}% bond between 8 and 7
  1748. }%
  1749. \else\if\member g\relax%
  1750. {\let\eee=\fff \let\fff=\ggg% 
  1751.  \put(0,0){\bonde}% bond between 6 and 7
  1752. }%
  1753. \else\if\member h\relax%
  1754. {\let\ddd=\eee \let\eee=\fff%
  1755.  \put(0,0){\bondd}% bond between 5 and 6
  1756. }%
  1757. \else\if\member i\relax%
  1758. {\let\ccc=\iii \let\ddd=\eee%
  1759.  \put(0,0){\bondc}% bond between 5 and 4a
  1760. }%
  1761. \else\if\member j\relax%
  1762. {\let\eee=\iii%
  1763.  \put(342,0){\bondd}% bond between 4 and 4a
  1764. }%
  1765. \else\if\member k\relax%
  1766. {\let\ccc=\iii\let\bbb=\jjj%
  1767.  \put(0,0){\bondb}% bond between 8a and 4a
  1768. }%
  1769. \else\if\member A%left aromatic circle 
  1770.   \put(0,203){\circle{240}}               %circle
  1771. \else\if\member B%left aromatic circle 
  1772.   \put(342,203){\circle{240}}             %circle
  1773. \else \expandafter\twoch@@r\member{}{}%
  1774.   \def\aax{4a} \def\aay{8a}%
  1775.       \if\@@tmpa 4\relax%                  % plus charge etc.
  1776.         \putratom{304}{282}{\@@tmpb}%      % right type
  1777.       \else\if\@@tmpa 3\relax%
  1778.         \putratom{402}{253}{\@@tmpb}%      % right type
  1779.       \else\if\@@tmpa 2\relax%
  1780.         \putratom{402}{120}{\@@tmpb}%      % right type
  1781.       \else\if\@@tmpa 1\relax%
  1782.         \putratom{304}{68}{\@@tmpb}%       % right type
  1783.       \else\if\@@tmpa 7\relax%
  1784.         \putlatom{-60}{253}{\@@tmpb}%      % left type
  1785.       \else\if\@@tmpa 6\relax%
  1786.         \putlatom{-60}{120}{\@@tmpb}%      % left type
  1787.       \else\if\@@tmpa 5\relax%
  1788.         \putratom{-38}{282}{\@@tmpb}%      % right type
  1789.       \else\if\@@tmpa 9\relax%
  1790.         \putratom{60}{253}{\@@tmpb}%       % right type
  1791.       \else\ifx\@@tmpa\aax\relax%
  1792.         \putratom{60}{253}{\@@tmpb}%       % right type
  1793.       \else\ifx\@@tmpa\aay\relax%
  1794.         \putratom{60}{120}{\@@tmpb}%       % right type
  1795.       \else\if\@@tmpa 10\relax%
  1796.         \putratom{60}{120}{\@@tmpb}%       % right type
  1797.       \else\if\@@tmpa 8\relax%
  1798.         \putratom{-38}{68}{\@@tmpb}%       % right type
  1799.       \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  1800. \fi\fi\fi\fi\fi\fi\fi\fi\fi%
  1801. \fi\fi\fi\fi\fi\fi%
  1802. }%
  1803. %%%%%%%%%%%%%%%%%%%%%%%%
  1804. % setting hetero atoms %
  1805. %%%%%%%%%%%%%%%%%%%%%%%%
  1806. % hetero atom on 1
  1807. \ifx\aaa\empty\else%
  1808.      \@acliptrue%
  1809.      \putratom{311}{356}{\aaa}%  % right type
  1810. \fi%
  1811. % hetero atom on 2
  1812. \ifx\bbb\empty\else%
  1813.      \@bcliptrue%
  1814.      \putratom{477}{280}{\bbb}%  % right type
  1815. \fi%
  1816. % hetero atom on 3
  1817. \ifx\ccc\empty\else%
  1818.      \@ccliptrue%
  1819.      \putratom{477}{65}{\ccc}%   % right type
  1820. \fi%
  1821. % hetero atom on 4
  1822. \ifx\ddd\empty\else%
  1823.    \@cliptrue%
  1824.    \putratom{311}{-10}{\ddd}%  % right type
  1825. \fi%
  1826. % hetero atom on 4a
  1827. {\let\eee=\iii%
  1828. \ifx\eee\empty\else%
  1829.      \global\@icliptrue%
  1830.      \putlatom{207}{65}{\iii}%  % left type
  1831. \fi%
  1832. }%
  1833. % hetero atom on 8a
  1834. {\let\fff=\jjj%
  1835. \ifx\fff\empty\else%
  1836.      \global\@jcliptrue%
  1837.      \putlatom{207}{280}{\jjj}% % left type
  1838. \fi%
  1839. }%
  1840. % hetero atom on 5
  1841. {\let\ddd=\eee%
  1842. \ifx\ddd\empty\else%
  1843.    \global\@ecliptrue%
  1844.    \putratom{-31}{-10}{\eee}%  % right type
  1845. \fi%
  1846. }%
  1847. % hetero atom on 6
  1848. {\let\eee=\fff%
  1849. \ifx\eee\empty\else%
  1850.      \global\@fcliptrue%
  1851.      \putlatom{-135}{65}{\fff}%  % left type
  1852. \fi%
  1853. }%
  1854. % hetero atom on 7
  1855. {\let\fff=\ggg%
  1856. \ifx\fff\empty\else%
  1857.      \global\@gcliptrue%
  1858.      \putlatom{-135}{280}{\ggg}% % left type
  1859. \fi%
  1860. }%
  1861. % hetero atom on 8
  1862. {\let\aaa=\hhh%
  1863. \ifx\aaa\empty\else%
  1864.      \global\@hcliptrue%
  1865.      \putratom{-31}{356}{\hhh}%  % right type
  1866. \fi%
  1867. }%
  1868. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1869. % setting substituents and exocyclic bonds %
  1870. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1871. \put(342,0){\setsixringv{#3}{5}{0}{5}{-1}}% %substituents on 1 to 4
  1872. {\@clipfalse \if@eclip \@cliptrue \fi%      %substituents on 6 to 8
  1873.  \@eclipfalse \if@fclip \@ecliptrue \fi%
  1874.  \@fclipfalse \if@gclip \@fcliptrue \fi%
  1875. \put(0,0){\setsixringv{#3}{12}{3}{7}{-1}}%
  1876. }
  1877. {\@aclipfalse \if@hclip \@acliptrue \fi%    %substituent on 5
  1878. \put(0,0){\setsixringv{#3}{-4}{0}{2}{0}}%
  1879. }%
  1880. {\@clipfusefalse \if@iclip \@clipfusetrue \fi%
  1881.  \put(171,103){\setatombond{#3}{-9}{7}}%    %10 for 8a position
  1882. }%
  1883. {\@clipfusefalse \if@jclip \@clipfusetrue \fi%
  1884.   \put(171,303){\setatombond{#3}{-8}{1}}%   %9 for 4a position
  1885. }%
  1886. \end{picture}\iniatom\iniflag}%             %end of \decaheterovi macro
  1887. %
  1888. % ****************************************************
  1889. % * heterocycles having two fused six-membered rings *
  1890. % *  (vertical type)                                 *
  1891. % ****************************************************
  1892. %
  1893. %   \quinolinev[BONDLIST]{SUBSLIST}
  1894. %   \quinolinevi[BONDLIST]{SUBSLIST}
  1895. %   \isoquinolinev[BONDLIST]{SUBSLIST}
  1896. %   \isoquinolinevi[BONDLIST]{SUBSLIST}
  1897. %   \quinoxalinev[BONDLIST]{SUBSLIST}
  1898. %   \quinazolinev[BONDLIST]{SUBSLIST}
  1899. %   \quinazolinevi[BONDLIST]{SUBSLIST}
  1900. %   \cinnolinev[BONDLIST]{SUBSLIST}
  1901. %   \cinnolinevi[BONDLIST]{SUBSLIST}
  1902. %   \pteridinev[BONDLIST]{SUBSLIST}
  1903. %   \pteridinevi[BONDLIST]{SUBSLIST}
  1904. %  
  1905. %     BONDLIST:  list of bonds 
  1906. %
  1907. %           none or r  :  decahetero (right-handed)
  1908. %           l          :  decahetero (left-handed)
  1909. %           H or []    :  fully saturated form
  1910. %           a    :  1,2-double bond      b    :  2,3-double bond
  1911. %           c    :  4,3-double bond      d    :  4,4a-double bond
  1912. %           e    :  4a,5-double bond     f    :  5,6-double bond
  1913. %           g    :  6,7-double bond      h    :  7,8-double bond
  1914. %           i    :  8,8a-double bond     j    :  1,8a-double bond
  1915. %           k    :  4a,8a-double bond
  1916. %           A    :  aromatic circle      B    :  aromatic circle
  1917. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1918. %
  1919. %     SUBSLIST: list of substituents (max 6 substitution positions)
  1920. %
  1921. %       for n = 1 to 8
  1922. %
  1923. %           nD         :  exocyclic double bond at n-atom
  1924. %           n or nS    :  exocyclic single bond at n-atom
  1925. %           nA         :  alpha single bond at n-atom
  1926. %           nB         :  beta single bond at n-atom
  1927. %           nSA        :  alpha single bond at n-atom (boldface)
  1928. %           nSB        :  beta single bond at n-atom (dotted line)
  1929. %           nSa        :  alpha (not specified) single bond at n-atom
  1930. %           nSb        :  beta (not specified) single bond at n-atom
  1931. %
  1932. %       for 9 (4a position) and 10 (8a position)
  1933. %
  1934. %           nD         :  exocyclic double bond at n-atom
  1935. %           n or nS    :  exocyclic single bond at n-atom
  1936. %           nA         :  alpha single bond at n-atom
  1937. %           nB         :  beta single bond at n-atom
  1938. %
  1939. %       e.g. 
  1940. %        
  1941. %        \decaheterov{1==N}{1==Cl;2==F}
  1942. %        \decaheterov[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  1943. %        \decaheterov[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1944. %
  1945. \def\quinolinev{\@ifnextchar[{\@quinolinev}{\@quinolinev[acfhk]}}
  1946. \def\@quinolinev[#1]#2{%
  1947. \iforigpt \typeout{command `quinolinev' is based on `decaheterov'.}\fi%
  1948. \decaheterov[#1]{1==N}{#2}}
  1949. \def\quinolinevi{\@ifnextchar[{\@quinolinevi}{\@quinolinevi[acfhk]}}
  1950. \def\@quinolinevi[#1]#2{%
  1951. \iforigpt \typeout{command `quinolinevi' is based on `decaheterovi'.}\fi%
  1952. \decaheterovi[#1]{1==N}{#2}}
  1953. %
  1954. \def\isoquinolinev{\@ifnextchar[{\@isoquinolinev}{\@isoquinolinev[acfhk]}}
  1955. \def\@isoquinolinev[#1]#2{%
  1956. \iforigpt \typeout{command `isoquinolinev' is based on `decaheterov'.}\fi%
  1957. \decaheterov[#1]{2==N}{#2}}
  1958. \def\isoquinolinevi{\@ifnextchar[{\@isoquinolinevi}{\@isoquinolinevi[acfhk]}}
  1959. \def\@isoquinolinevi[#1]#2{%
  1960. \iforigpt \typeout{command `isoquinolinevi' is based on `decaheterovi'.}\fi%
  1961. \decaheterovi[#1]{2==N}{#2}}
  1962. %
  1963. \def\quinoxalinev{\@ifnextchar[{\@quinoxalinev}{\@quinoxalinev[acfhk]}}
  1964. \def\@quinoxalinev[#1]#2{%
  1965. \iforigpt \typeout{command `quinoxalinev' is based on `decaheterov'.}\fi%
  1966. \decaheterov[#1]{1==N;4==N}{#2}}
  1967. %
  1968. \def\quinazolinev{\@ifnextchar[{\@quinazolinev}{\@quinazolinev[acfhk]}}
  1969. \def\@quinazolinev[#1]#2{%
  1970. \iforigpt \typeout{command `quinazolinev' is based on `decaheterov'.}\fi%
  1971. \decaheterov[#1]{1==N;3==N}{#2}}
  1972. \def\quinazolinevi{\@ifnextchar[{\@quinazolinevi}{\@quinazolinevi[acfhk]}}
  1973. \def\@quinazolinevi[#1]#2{%
  1974. \iforigpt \typeout{command `quinazolinevu' is based on `decaheterovi'.}\fi%
  1975. \decaheterovi[#1]{1==N;3==N}{#2}}
  1976. %
  1977. \def\cinnolinev{\@ifnextchar[{\@cinnolinev}{\@cinnolinev[acfhk]}}
  1978. \def\@cinnolinev[#1]#2{%
  1979. \iforigpt \typeout{command `cinnolinev' is based on `decaheterov'.}\fi%
  1980. \decaheterov[#1]{1==N;2==N}{#2}}
  1981. \def\cinnolinevi{\@ifnextchar[{\@cinnolinevi}{\@cinnolinevi[acfhk]}}
  1982. \def\@cinnolinevi[#1]#2{%
  1983. \iforigpt \typeout{command `cinnolinev' is based on `decaheterovi'.}\fi%
  1984. \decaheterovi[#1]{1==N;2==N}{#2}}
  1985. %
  1986. \def\pteridinev{\@ifnextchar[{\@pteridinev}{\@pteridinev[acfhk]}}
  1987. \def\@pteridinev[#1]#2{%
  1988. \iforigpt \typeout{command `pteridinev' is based on `decaheterov'.}\fi%
  1989. \decaheterov[#1]{1==N;3==N;5==N;8==N}{#2}}
  1990. \def\pteridinevi{\@ifnextchar[{\@pteridinevi}{\@pteridinevi[acfhk]}}
  1991. \def\@pteridinevi[#1]#2{%
  1992. \iforigpt \typeout{command `pteridinevi' is based on `decaheterovi'.}\fi%
  1993. \decaheterovi[#1]{1==N;3==N;5==N;8==N}{#2}}
  1994. %
  1995. % **************************
  1996. % * nonahetero derivatives *
  1997. % *  (vertical type)       *
  1998. % **************************
  1999. % The following numbering is adopted in this macro. 
  2000. %
  2001. %          4
  2002. %          *  3a(8) 
  2003. %     5  *   * _____  3
  2004. %       |     |     |
  2005. %       |     |     |
  2006. %     6  *   * *   *  2
  2007. %          *  7a *
  2008. %          7 (9) 1
  2009. %          ^
  2010. %          |
  2011. %          the original point
  2012. %
  2013. %   \nonaheterov[BONDLIST]{ATOMLIST}{SUBSLIST}
  2014. %  
  2015. %     BONDLIST:  list of bonds 
  2016. %
  2017. %           none or r  :  aromatic six-membered ring
  2018. %           H or []    :  fully saturated form
  2019. %           a    :  1,2-double bond      b    :  2,3-double bond
  2020. %           c    :  3,3a-double bond     d    :  4,3a-double bond
  2021. %           e    :  4,5-double bond      f    :  5,6-double bond
  2022. %           g    :  6,7-double bond      h    :  7,7a-double bond
  2023. %           i    :  1,7a-double bond     j    :  3a,4a-double bond
  2024. %           A    :  aromatic circle (six-membered ring)
  2025. %           B    :  aromatic circle (five-membered ring)
  2026. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 7)
  2027. %
  2028. %     ATOMLIST: list of heteroatoms (max 9 atoms)
  2029. %
  2030. %       for n = 1 to 7
  2031. %
  2032. %            n         : Hetero atom, e.g. N, O, etc. at n-position
  2033. %                        e.g. 1==N for N at 1-position
  2034. %            na        : Hetero atom at 3a or 7b (n=3 or 7)
  2035. %                        e.g. 3a==N (or 8==N) for N at 4a-position
  2036. %                             7a==N (or 9==N) for N at 8a-position
  2037. %
  2038. %     SUBSLIST: list of substituents (max 7 substitution positions)
  2039. %
  2040. %       for n = 1 to 8
  2041. %
  2042. %           nD         :  exocyclic double bond at n-atom
  2043. %           n or nS    :  exocyclic single bond at n-atom
  2044. %           nA         :  alpha single bond at n-atom
  2045. %           nB         :  beta single bond at n-atom
  2046. %           nSA        :  alpha single bond at n-atom (boldface)
  2047. %           nSB        :  beta single bond at n-atom (dotted line)
  2048. %           nSa        :  alpha (not specified) single bond at n-atom
  2049. %           nSb        :  beta (not specified) single bond at n-atom
  2050. %
  2051. %       for 8 (3a position) and 9 (7a position)
  2052. %
  2053. %           nD         :  exocyclic double bond at n-atom
  2054. %           n or nS    :  exocyclic single bond at n-atom
  2055. %           nA         :  alpha single bond at n-atom
  2056. %           nB         :  beta single bond at n-atom
  2057. %
  2058. %       e.g. 
  2059. %        
  2060. %        \nonaheterov{1==N}{1==Cl;2==F}
  2061. %        \nonaheterov[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  2062. %
  2063. \def\nonaheterov{\@ifnextchar[{\@nonaheterov}{\@nonaheterov[r]}}
  2064. \def\@nonaheterov[#1]#2#3{%
  2065. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2066. % treatment of atom list %
  2067. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2068. \iniflag\iniatom%
  2069. \@forsemicol\member:=#2\do{%
  2070. \expandafter\@m@mb@r\member;\relax%
  2071. \expandafter\twoch@r\@membera{}%
  2072. \ifcase\@tmpa%
  2073.  \or \xdef\ddd{\@memberb}%1
  2074.  \or \xdef\ccc{\@memberb}%2
  2075.  \or%
  2076.    \if\@tmpb a%
  2077.      \xdef\jjj{\@memberb}%3a
  2078.    \else\ifx\@tmpb\empty%
  2079.      \xdef\bbb{\@memberb}%3
  2080.    \fi\fi
  2081.  \or \xdef\hhh{\@memberb}%4
  2082.  \or \xdef\ggg{\@memberb}%5
  2083.  \or \xdef\fff{\@memberb}%6
  2084.  \or% 
  2085.    \if\@tmpb a%
  2086.      \xdef\iii{\@memberb}%7a
  2087.    \else\ifx\@tmpb\empty%
  2088.      \xdef\eee{\@memberb}%7
  2089.    \fi\fi
  2090. \or \xdef\jjj{\@memberb}%8 (= 3a)
  2091. \or \xdef\iii{\@memberb}%9 (= 7a)
  2092. \fi}%
  2093.  \begin{picture}(1200,880)(-\shiftii,-\shifti)%
  2094.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  2095.            \put(-\noshift,-\noshift){\circle{50}}% 
  2096.    \typeout{command `nonaheterov' origin: %
  2097.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  2098. %%%%%%%%%%%%%%%%%%
  2099. % outer skeleton %
  2100. %%%%%%%%%%%%%%%%%%
  2101. {\let\fff=\jjj \let\eee=\iii%
  2102.  \put(342,0){\skbondb}% bond between 2 and 3  3 and 2
  2103.  \put(342,0){\skbondc}% bond between 1 and 2  4 and 3
  2104.  \put(342,0){\skbondd}% bond between 7a and 3a  4 and 4a
  2105.  \put(342,0){\skbonde}% bond between 1 and 7a  4a and 8a
  2106.  \put(342,0){\skbondhoriz}% bond between 3 and 3a
  2107. }%
  2108. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  2109.  \let\ccc=\iii\let\bbb=\jjj%
  2110.  \put(0,0){\skbonda}% bond between 4 and 3a 8 and 8a
  2111.  \put(0,0){\skbondc}% bond between 7 and 7a 5 and 4a
  2112.  \put(0,0){\skbondf}% bond between 4 and 5 8 and 7
  2113.  \put(0,0){\skbondd}% bond between 7 and 6 5 and 6
  2114.  \put(0,0){\skbonde}% bond between 5 and 6 6 and 7
  2115. }%
  2116. %%%%%%%%%%%%%%%%%%%%%
  2117. % inner double bond %
  2118. %%%%%%%%%%%%%%%%%%%%%
  2119. \@tfor\member:=#1\do{%
  2120. \if\member r\relax%
  2121. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  2122.  \let\ccc=\iii\let\bbb=\jjj%
  2123.  \put(0,0){\bondb}% bond between 3a and 7a
  2124.  \put(0,0){\bondf}% bond between 4 and 5
  2125.  \put(0,0){\bondd}% bond between 6 and 7
  2126. }%
  2127. \else\if\member l\relax%
  2128. \else\if\member a\relax%
  2129.  \put(342,0){\bondc}% bond between 3 and 4
  2130. \else\if\member b\relax%
  2131.  \put(342,0){\bondb}% bond between 2 and 3
  2132. \else\if\member c\relax%
  2133.  \put(342,0){\bondhoriz}% bond between 3 and 3a
  2134. \else\if\member d\relax%
  2135. {\let\aaa=\hhh \let\bbb=\jjj%
  2136.  \put(0,0){\bonda}% bond between 4 and 3a
  2137. }
  2138. \else\if\member e\relax%
  2139. {\let\aaa=\hhh \let\fff=\ggg%
  2140.  \put(0,0){\bondf}% bond between 4 and 5
  2141. }%
  2142. \else\if\member f\relax%
  2143. {\let\eee=\fff \let\fff=\ggg%
  2144.  \put(0,0){\bonde}% bond between 5 and 6
  2145. }%
  2146. \else\if\member g\relax%
  2147. {\let\ddd=\eee \let\eee=\fff%
  2148.  \put(0,0){\bondd}% bond between 6 and 7
  2149. }%
  2150. \else\if\member h\relax%
  2151. {\let\ccc=\iii \let\ddd=\eee%
  2152.  \put(0,0){\bondc}% bond between 7 and 7a
  2153. }%
  2154. \else\if\member i\relax%
  2155. {\let\eee=\iii%
  2156.  \put(342,0){\bondd}% bond between 1 and 7a
  2157. }%
  2158. \else\if\member j\relax%
  2159. {\let\ccc=\iii\let\bbb=\jjj%
  2160.  \put(0,0){\bondb}% bond between 7a and 3a
  2161. }%
  2162. \else\if\member A%left aromatic circle 
  2163.   \put(0,203){\circle{240}}               %circle
  2164. \else\if\member B%left aromatic circle 
  2165.   \put(342,173){\circle{180}}               %circle 1993/11/20 S.Fujita
  2166. \else \expandafter\twoch@@r\member{}{}%
  2167.   \def\aax{7a} \def\aay{3a}%
  2168.       \if\@@tmpa 1\relax%
  2169.         \putratom{304}{68}{\@@tmpb}%       % right type
  2170.       \else\if\@@tmpa 2\relax%
  2171.         \putratom{402}{120}{\@@tmpb}%      % right type
  2172.       \else\if\@@tmpa 3\relax%
  2173.         \putratom{402}{253}{\@@tmpb}%      % right type
  2174.       \else\if\@@tmpa 4\relax%
  2175.         \putratom{-38}{282}{\@@tmpb}%      % right type
  2176.       \else\if\@@tmpa 5\relax%
  2177.         \putlatom{-60}{120}{\@@tmpb}%      % left type
  2178.       \else\if\@@tmpa 6\relax%
  2179.         \putlatom{-60}{253}{\@@tmpb}%      % left type
  2180.       \else\if\@@tmpa 7\relax%
  2181.         \putratom{-38}{68}{\@@tmpb}%       % right type
  2182.       \else\if\@@tmpa 8\relax%
  2183.         \putratom{60}{253}{\@@tmpb}%       % right type
  2184.       \else\ifx\@@tmpa\aax\relax%
  2185.         \putratom{60}{253}{\@@tmpb}%       % right type
  2186.       \else\ifx\@@tmpa\aay\relax%
  2187.         \putratom{60}{120}{\@@tmpb}%       % right type
  2188.       \else\if\@@tmpa 9\relax%
  2189.         \putratom{60}{120}{\@@tmpb}%       % right type
  2190.       \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  2191. \fi\fi\fi\fi\fi\fi\fi\fi%
  2192. \fi\fi\fi\fi\fi\fi%
  2193. }%
  2194. %%%%%%%%%%%%%%%%%%%%%%%%
  2195. % setting hetero atoms %
  2196. %%%%%%%%%%%%%%%%%%%%%%%%
  2197. % hetero atom on 1
  2198. %\ifx\aaa\empty\else%
  2199. %     \@acliptrue
  2200. %     \putratom{311}{356}{\aaa}%  % right type
  2201. %\fi
  2202. % hetero atom on 1%4
  2203. \ifx\ddd\empty\else%
  2204.    \@cliptrue% 
  2205.    \putratom{311}{-10}{\ddd}%     % right type
  2206. \fi%
  2207. % hetero atom on 2%3
  2208. \ifx\ccc\empty\else%
  2209.      \@ccliptrue%
  2210.      \putratom{477}{65}{\ccc}%    % right type
  2211. \fi%
  2212. % hetero atom on 3%2
  2213. \ifx\bbb\empty\else%
  2214.      \@bcliptrue%
  2215.      \putratom{477}{280}{\bbb}%   % right type
  2216. \fi%
  2217. % hetero atom on 3a%8a
  2218. {\let\fff=\jjj%
  2219. \ifx\fff\empty\else%
  2220.      \global\@jcliptrue%
  2221.      \putlatom{207}{280}{\jjj}%   % left type
  2222. \fi%
  2223. }%
  2224. % hetero atom on 4%8
  2225. {\let\aaa=\hhh%
  2226. \ifx\aaa\empty\else%
  2227.      \global\@hcliptrue%
  2228.      \putratom{-31}{356}{\hhh}%   % right type
  2229. \fi%
  2230. }
  2231. % hetero atom on 5%7
  2232. {\let\fff=\ggg%
  2233. \ifx\fff\empty\else%
  2234.      \global\@gcliptrue%
  2235.      \putlatom{-135}{280}{\ggg}%  % left type
  2236. \fi%
  2237. }
  2238. % hetero atom on 6
  2239. {\let\eee=\fff%
  2240. \ifx\eee\empty\else%
  2241.      \global\@fcliptrue%
  2242.      \putlatom{-135}{65}{\fff}%   % left type
  2243. \fi
  2244. }%
  2245. % hetero atom on 7%5
  2246. {\let\ddd=\eee%
  2247. \ifx\ddd\empty\else%
  2248.    \global\@ecliptrue% 
  2249.    \putratom{-31}{-10}{\eee}%     % right type
  2250. \fi%
  2251. }
  2252. % hetero atom on 7a%4a
  2253. {\let\eee=\iii%
  2254. \ifx\eee\empty\else%
  2255.      \global\@icliptrue%
  2256.      \putlatom{207}{65}{\iii}%    % left type
  2257. \fi%
  2258. }%
  2259. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2260. % setting substituents and exocyclic bonds %
  2261. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2262. \put(342,0){\setsixringv{#3}{5}{1}{5}{-1}}% %substituents on 1 to 3
  2263. {\@clipfalse \if@eclip \@cliptrue \fi%      %substituents on 5 to 7
  2264.  \@eclipfalse \if@fclip \@ecliptrue \fi%
  2265.  \@fclipfalse \if@gclip \@fcliptrue \fi%
  2266. \put(0,0){\setsixringv{#3}{11}{3}{7}{-1}}%
  2267. }%
  2268. {\@aclipfalse \if@hclip \@acliptrue \fi%    %substituent on 4
  2269. \put(0,0){\setsixringv{#3}{-3}{0}{2}{0}}%
  2270. }%
  2271. {\@clipfusefalse \if@iclip \@clipfusetrue \fi%
  2272.  \put(171,103){\setatombond{#3}{-8}{7}}%    %9 for 7a position
  2273. }%
  2274. {\@clipfusefalse \if@jclip \@clipfusetrue \fi%
  2275.   \put(171,303){\setatombond{#3}{-7}{1}}%   %8 for 3a position
  2276. }%
  2277. \end{picture}\iniatom\iniflag}%             %end of \nonaheterov macro
  2278. %
  2279. % **********************************
  2280. % * nonahetero derivatives         *
  2281. % *  (vertical type, inverse type) *
  2282. % **********************************
  2283. % The following numbering is adopted in this macro. 
  2284. %
  2285. %          7(10) 1
  2286. %          * 7a  *
  2287. %     6  *   * *   *  2
  2288. %       |     |     |
  2289. %       |     |_____|
  2290. %     5  *   *        3
  2291. %          *  3a(8) 
  2292. %          4 
  2293. %          ^
  2294. %          |
  2295. %          the original point
  2296. %
  2297. %   \nonaheterovi[BONDLIST]{ATOMLIST}{SUBSLIST}
  2298. %  
  2299. %     BONDLIST:  list of bonds 
  2300. %
  2301. %           none or r  :  aromatic six-membered ring
  2302. %           H or []    :  fully saturated form
  2303. %           a    :  1,2-double bond      b    :  2,3-double bond
  2304. %           c    :  3,3a-double bond     d    :  4,3a-double bond
  2305. %           e    :  4,5-double bond      f    :  5,6-double bond
  2306. %           g    :  6,7-double bond      h    :  7,7a-double bond
  2307. %           i    :  1,7a-double bond     j    :  3a,4a-double bond
  2308. %           A    :  aromatic circle (six-membered ring)
  2309. %           B    :  aromatic circle (five-membered ring)
  2310. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 7)
  2311. %
  2312. %     ATOMLIST: list of heteroatoms (max 9 atoms)
  2313. %
  2314. %       for n = 1 to 7
  2315. %
  2316. %            n         : Hetero atom, e.g. N, O, etc. at n-position
  2317. %                        e.g. 1==N for N at 1-position
  2318. %            na        : Hetero atom at 3a or 7b (n=3 or 7)
  2319. %                        e.g. 3a==N (or 8==N) for N at 4a-position
  2320. %                             7a==N (or 9==N) for N at 8a-position
  2321. %
  2322. %     SUBSLIST: list of substituents (max 7 substitution positions)
  2323. %
  2324. %       for n = 1 to 8
  2325. %
  2326. %           nD         :  exocyclic double bond at n-atom
  2327. %           n or nS    :  exocyclic single bond at n-atom
  2328. %           nA         :  alpha single bond at n-atom
  2329. %           nB         :  beta single bond at n-atom
  2330. %           nSA        :  alpha single bond at n-atom (boldface)
  2331. %           nSB        :  beta single bond at n-atom (dotted line)
  2332. %           nSa        :  alpha (not specified) single bond at n-atom
  2333. %           nSb        :  beta (not specified) single bond at n-atom
  2334. %
  2335. %       for 8 (3a position) and 9 (7a position)
  2336. %
  2337. %           nD         :  exocyclic double bond at n-atom
  2338. %           n or nS    :  exocyclic single bond at n-atom
  2339. %           nA         :  alpha single bond at n-atom
  2340. %           nB         :  beta single bond at n-atom
  2341. %
  2342. %       e.g. 
  2343. %        
  2344. %        \nonaheterovi{1==N}{1==Cl;2==F}
  2345. %        \nonaheterovi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  2346. %
  2347. \def\nonaheterovi{\@ifnextchar[{\@nonaheterovi}{\@nonaheterovi[r]}}
  2348. \def\@nonaheterovi[#1]#2#3{%
  2349. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2350. % treatment of atom list %
  2351. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2352. \iniflag\iniatom%initialize
  2353. \@forsemicol\member:=#2\do{%
  2354. \expandafter\@m@mb@r\member;\relax%
  2355. \expandafter\twoch@r\@membera{}%
  2356. \ifcase\@tmpa%
  2357.  \or \xdef\aaa{\@memberb}%1
  2358.  \or \xdef\bbb{\@memberb}%2
  2359.  \or%
  2360.    \if\@tmpb a%
  2361.      \xdef\iii{\@memberb}%3a
  2362.    \else\ifx\@tmpb\empty%
  2363.      \xdef\ccc{\@memberb}%3
  2364.    \fi\fi
  2365.  \or \xdef\eee{\@memberb}%4
  2366.  \or \xdef\fff{\@memberb}%5
  2367.  \or \xdef\ggg{\@memberb}%6
  2368.  \or% 
  2369.    \if\@tmpb a%
  2370.      \xdef\jjj{\@memberb}%7a
  2371.    \else\ifx\@tmpb\empty%
  2372.      \xdef\hhh{\@memberb}%7
  2373.    \fi\fi
  2374. \or \xdef\iii{\@memberb}%8 (= 3a)
  2375. \or \xdef\jjj{\@memberb}%9 (= 7a)
  2376. \fi}%
  2377.  \begin{picture}(1200,880)(-\shiftii,-\shifti)%
  2378.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  2379.            \put(-\noshift,-\noshift){\circle{50}}% 
  2380.    \typeout{command `nonaheterovi' origin: %
  2381.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  2382. %%%%%%%%%%%%%%%%%%
  2383. % outer skeleton %
  2384. %%%%%%%%%%%%%%%%%%
  2385. {\let\fff=\jjj \let\eee=\iii%
  2386.  \put(342,0){\skbonda}% bond between 1 and 2
  2387.  \put(342,0){\skbondb}% bond between 2 and 3
  2388.  \put(342,0){\skbonde}% bond between 7a and 3a
  2389.  \put(342,0){\skbondf}% bond between 1 and 7a
  2390.  \put(342,0){\skbondhorizi}% bond between 3 and 3a
  2391. }%
  2392. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  2393.  \let\ccc=\iii\let\bbb=\jjj%
  2394.  \put(0,0){\skbonda}% bond between 7 and 7a
  2395.  \put(0,0){\skbondc}% bond between 4 and 3a
  2396.  \put(0,0){\skbondf}% bond between 6 and 7
  2397.  \put(0,0){\skbondd}% bond between 4 and 5 
  2398.  \put(0,0){\skbonde}% bond between 5 and 6 
  2399. }%
  2400. %%%%%%%%%%%%%%%%%%%%%
  2401. % inner double bond %
  2402. %%%%%%%%%%%%%%%%%%%%%
  2403. \@tfor\member:=#1\do{%
  2404. \if\member r\relax%
  2405. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg
  2406.  \let\ccc=\iii\let\bbb=\jjj
  2407.  \put(0,0){\bondb}% bond between 3a and 7a
  2408.  \put(0,0){\bondf}% bond between 6 and 7
  2409.  \put(0,0){\bondd}% bond between 4 and 5
  2410. }%
  2411. \else\if\member l\relax%
  2412. \else\if\member a\relax%
  2413.  \put(342,0){\bonda}% bond between 1 and 2
  2414. \else\if\member b\relax%
  2415.  \put(342,0){\bondb}% bond between 2 and 3
  2416. \else\if\member c\relax%
  2417.  \put(342,0){\bondhorizi}% bond between 3 and 3a
  2418. \else\if\member d\relax%
  2419. {\let\ccc=\iii \let\ddd=\eee%
  2420.  \put(0,0){\bondc}% bond between 4 and 3a
  2421. }%
  2422. \else\if\member e\relax%
  2423. {\let\ddd=\eee\let\eee=\fff%
  2424.  \put(0,0){\bondd}% bond between 4 and 5
  2425. }%
  2426. %{\let\eee=\iii%
  2427. % \put(342,0){\bondd}% bond between 4 and 5
  2428. %}%
  2429. \else\if\member f\relax%
  2430. {\let\eee=\fff \let\fff=\ggg%
  2431.  \put(0,0){\bonde}% bond between 5 and 6
  2432. }%
  2433. \else\if\member g\relax%
  2434. {\let\aaa=\hhh \let\fff=\ggg%
  2435.  \put(0,0){\bondf}% bond between 7 and 6
  2436. }%
  2437. \else\if\member h\relax%
  2438. {\let\aaa=\hhh \let\bbb=\jjj%
  2439.  \put(0,0){\bonda}% bond between 7 and 7a
  2440. }%
  2441. \else\if\member i\relax%
  2442. {\let\fff=\jjj%
  2443.  \put(342,0){\bondf}% bond between 1 and 7a
  2444. }%
  2445. \else\if\member j\relax%
  2446. {\let\ccc=\iii\let\bbb=\jjj%
  2447.  \put(0,0){\bondb}% bond between 7a and 3a
  2448. }%
  2449. \else\if\member A%left aromatic circle 
  2450.   \put(0,203){\circle{240}}%               %circle
  2451. \else\if\member B%left aromatic circle 
  2452.   \put(342,233){\circle{180}}               %circle 1993/11/20 S.Fujita
  2453. \else \expandafter\twoch@@r\member{}{}%
  2454.   \def\aax{7a} \def\aay{3a}%
  2455.       \if\@@tmpa 1\relax%
  2456.         \putratom{304}{282}{\@@tmpb}%       % right type
  2457.       \else\if\@@tmpa 3\relax%
  2458.         \putratom{402}{120}{\@@tmpb}%      % right type
  2459.       \else\if\@@tmpa 2\relax%
  2460.         \putratom{402}{253}{\@@tmpb}%      % right type
  2461.       \else\if\@@tmpa 7\relax%
  2462.         \putratom{-38}{282}{\@@tmpb}%      % right type
  2463.       \else\if\@@tmpa 6\relax%
  2464.         \putlatom{-60}{120}{\@@tmpb}%      % left type
  2465.       \else\if\@@tmpa 5\relax%
  2466.         \putlatom{-60}{253}{\@@tmpb}%      % left type
  2467.       \else\if\@@tmpa 4\relax%
  2468.         \putratom{-38}{68}{\@@tmpb}%       % right type
  2469.       \else\if\@@tmpa 9\relax%
  2470.         \putratom{60}{253}{\@@tmpb}%       % right type
  2471.       \else\ifx\@@tmpa\aax\relax%
  2472.         \putratom{60}{253}{\@@tmpb}%       % right type
  2473.       \else\ifx\@@tmpa\aay\relax%
  2474.         \putratom{60}{120}{\@@tmpb}%       % right type
  2475.       \else\if\@@tmpa 8\relax%
  2476.         \putratom{60}{120}{\@@tmpb}%       % right type
  2477.       \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  2478. \fi\fi\fi\fi\fi\fi\fi\fi%
  2479. \fi\fi\fi\fi\fi\fi%
  2480. }%
  2481. %%%%%%%%%%%%%%%%%%%%%%%%
  2482. % setting hetero atoms %
  2483. %%%%%%%%%%%%%%%%%%%%%%%%
  2484. % hetero atom on 1
  2485. \ifx\aaa\empty\else%
  2486.      \@acliptrue%
  2487.      \putratom{311}{356}{\aaa}%  % right type
  2488. \fi%
  2489. % hetero atom on 1%4
  2490. %\ifx\ddd\empty\else%
  2491. %   \@cliptrue% 
  2492. %   \putratom{311}{-10}{\ddd}%     % right type
  2493. %\fi
  2494. % hetero atom on 3
  2495. \ifx\ccc\empty\else%
  2496.      \@ccliptrue%
  2497.      \putratom{477}{65}{\ccc}%    % right type
  2498. \fi%
  2499. % hetero atom on 2
  2500. \ifx\bbb\empty\else%
  2501.      \@bcliptrue%
  2502.      \putratom{477}{280}{\bbb}%   % right type
  2503. \fi%
  2504. % hetero atom on 7a
  2505. {\let\fff=\jjj%
  2506. \ifx\fff\empty\else%
  2507.      \global\@jcliptrue%
  2508.      \putlatom{207}{280}{\jjj}%   % left type
  2509. \fi%
  2510. }%
  2511. % hetero atom on 7
  2512. {\let\aaa=\hhh%
  2513. \ifx\aaa\empty\else%
  2514.      \global\@hcliptrue%
  2515.      \putratom{-31}{356}{\hhh}%   % right type
  2516. \fi%
  2517. }%
  2518. % hetero atom on 6
  2519. {\let\fff=\ggg%
  2520. \ifx\fff\empty\else%
  2521.      \global\@gcliptrue%
  2522.      \putlatom{-135}{280}{\ggg}%  % left type
  2523. \fi%
  2524. }%
  2525. % hetero atom on 5
  2526. {\let\eee=\fff%
  2527. \ifx\eee\empty\else%
  2528.      \global\@fcliptrue%
  2529.      \putlatom{-135}{65}{\fff}%   % left type
  2530. \fi%
  2531. }
  2532. % hetero atom on 4
  2533. {\let\ddd=\eee%
  2534. \ifx\ddd\empty\else%
  2535.    \global\@ecliptrue% 
  2536.    \putratom{-31}{-10}{\eee}%     % right type
  2537. \fi%
  2538. }
  2539. % hetero atom on 3a
  2540. {\let\eee=\iii%
  2541. \ifx\eee\empty\else%
  2542.      \global\@icliptrue%
  2543.      \putlatom{207}{65}{\iii}%    % left type
  2544. \fi%
  2545. }%
  2546. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2547. % setting substituents and exocyclic bonds %
  2548. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2549. \put(342,0){\setsixringv{#3}{0}{0}{4}{0}}% %substituents on 1 to 3
  2550. {\@clipfalse \if@eclip \@cliptrue \fi%     %substituents on 4 to 6
  2551.  \@eclipfalse \if@fclip \@ecliptrue \fi%
  2552.  \@fclipfalse \if@gclip \@fcliptrue \fi%
  2553. \put(0,0){\setsixringv{#3}{0}{3}{7}{0}}%
  2554. }%
  2555. {\@aclipfalse \if@hclip \@acliptrue \fi%   %substituent on 7
  2556. \put(0,0){\setsixringv{#3}{-6}{0}{2}{0}}%
  2557. }%
  2558. {\@clipfusefalse \if@iclip \@clipfusetrue \fi%
  2559.  \put(171,103){\setatombond{#3}{-7}{7}}%   %8 for 3a position
  2560. }%
  2561. {\@clipfusefalse \if@jclip \@clipfusetrue \fi%
  2562.   \put(171,303){\setatombond{#3}{-8}{1}}%  %9 for 7a position
  2563. }%
  2564. \end{picture}\iniatom\iniflag}%            %end of \nonaheterovi macro
  2565. %
  2566. % **********************************************************
  2567. % * heterocycles having fused six- and five-membered rings *
  2568. % *  (vertical type)                                       *
  2569. % **********************************************************
  2570. %
  2571. %   N-heterocycles:
  2572. %
  2573. %   \indolev[BONDLIST]{SUBSLIST}
  2574. %   \indolevi[BONDLIST]{SUBSLIST}
  2575. %
  2576. %   \isoindolev[BONDLIST]{SUBSLIST}
  2577. %   \isoindolevi[BONDLIST]{SUBSLIST}
  2578. %
  2579. %   \indolizinev[BONDLIST]{SUBSLIST}
  2580. %   \indolizinevi[BONDLIST]{SUBSLIST}
  2581. %          (different from the IUPAC numbering)
  2582. %
  2583. %   \purinev[BONDLIST]{SUBSLIST}
  2584. %   \purinevi[BONDLIST]{SUBSLIST}
  2585. %          (different from the IUPAC numbering)
  2586. %
  2587. %   O-heterocycles:
  2588. %
  2589. %   \benzofuranev[BONDLIST]{SUBSLIST}
  2590. %   \benzofuranevi[BONDLIST]{SUBSLIST}
  2591. %
  2592. %   \isobenzofuranevi[BONDLIST]{SUBSLIST}
  2593. %
  2594. %   \benzoxazolev[BONDLIST]{SUBSLIST}
  2595. %   \benzoxazolevi[BONDLIST]{SUBSLIST}
  2596. %  
  2597. %     BONDLIST:  list of bonds 
  2598. %
  2599. %           none or r  :  aromatic six-membered ring
  2600. %           H or []    :  fully saturated form
  2601. %           a    :  1,2-double bond      b    :  2,3-double bond
  2602. %           c    :  3,3a-double bond     d    :  4,3a-double bond
  2603. %           e    :  4,5-double bond      f    :  5,6-double bond
  2604. %           g    :  6,7-double bond      h    :  7,7a-double bond
  2605. %           i    :  1,7a-double bond     j    :  3a,4a-double bond
  2606. %           A    :  aromatic circle
  2607. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 7)
  2608. %
  2609. %     SUBSLIST: list of substituents (max 7 substitution positions)
  2610. %
  2611. %       for n = 1 to 8
  2612. %
  2613. %           nD         :  exocyclic double bond at n-atom
  2614. %           n or nS    :  exocyclic single bond at n-atom
  2615. %           nA         :  alpha single bond at n-atom
  2616. %           nB         :  beta single bond at n-atom
  2617. %           nSA        :  alpha single bond at n-atom (boldface)
  2618. %           nSB        :  beta single bond at n-atom (dotted line)
  2619. %           nSa        :  alpha (not specified) single bond at n-atom
  2620. %           nSb        :  beta (not specified) single bond at n-atom
  2621. %
  2622. %       for 8 (3a position) and 9 (7a position)
  2623. %
  2624. %           nD         :  exocyclic double bond at n-atom
  2625. %           n or nS    :  exocyclic single bond at n-atom
  2626. %           nA         :  alpha single bond at n-atom
  2627. %           nB         :  beta single bond at n-atom
  2628. %
  2629. %       e.g. 
  2630. %        
  2631. %        \indolev{1==N}{1==Cl;2==F}
  2632. %        \indolev[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  2633. %
  2634. \def\purinev{\@ifnextchar[{\@purinev}{\@purinev[ra]}}
  2635. \def\@purinev[#1]#2{%
  2636. \iforigpt \typeout{command `purinev' is based on `nonaheterov'.}\fi%
  2637. \nonaheterov[#1]{1==N;3==N;5==N;7==N}{#2}}
  2638. \def\purinevi{\@ifnextchar[{\@purinevi}{\@purinevi[ra]}}
  2639. \def\@purinevi[#1]#2{%
  2640. \iforigpt \typeout{command `purinevi' is based on `nonaheterovi'.}\fi%
  2641. \nonaheterovi[#1]{1==N;3==N;5==N;7==N}{#2}}
  2642. %
  2643. \def\indolev{\@ifnextchar[{\@indolev}{\@indolev[rb]}}
  2644. \def\@indolev[#1]#2{%
  2645. \iforigpt \typeout{command `indolev' is based on `nonaheterov'.}\fi%
  2646. \nonaheterov[#1]{1==N}{#2}}
  2647. \def\indolevi{\@ifnextchar[{\@indolevi}{\@indolevi[rb]}}
  2648. \def\@indolevi[#1]#2{%
  2649. \iforigpt \typeout{command `indolevi' is based on `nonaheterovi'.}\fi%
  2650. \nonaheterovi[#1]{1==N}{#2}}
  2651. %
  2652. \def\indolizinev{\@ifnextchar[{\@indolizinev}{\@indolizinev[aceg]}}
  2653. \def\@indolizinev[#1]#2{%
  2654. \iforigpt \typeout{command `indolizinev' is based on `nonaheterov'.}\fi%
  2655. \nonaheterov[#1]{7a==N}{#2}}
  2656. \def\indolizinevi{\@ifnextchar[{\@indolizinevi}{\@indolizinevi[aceg]}}
  2657. \def\@indolizinevi[#1]#2{%
  2658. \iforigpt \typeout{command `indolizinevi' is based on `nonaheterovi'.}\fi%
  2659. \nonaheterovi[#1]{7a==N}{#2}}
  2660. %
  2661. \def\isoindolev{\@ifnextchar[{\@isoindolev}{\@isoindolev[cegi]}}
  2662. \def\@isoindolev[#1]#2{%
  2663. \iforigpt \typeout{command `isoindolev' is based on `nonaheterov'.}\fi%
  2664. \nonaheterov[#1]{2==N}{#2}}
  2665. \def\isoindolevi{\@ifnextchar[{\@isoindolevi}{\@isoindolevi[cegi]}}
  2666. \def\@isoindolevi[#1]#2{%
  2667. \iforigpt \typeout{command `isoindolevi' is based on `nonaheterovi'.}\fi%
  2668. \nonaheterovi[#1]{2==N}{#2}}
  2669. %
  2670. \def\benzofuranev{\@ifnextchar[{\@benzofuranev}{\@benzofuranev[rb]}}
  2671. \def\@benzofuranev[#1]#2{%
  2672. \iforigpt \typeout{command `benzofuranev' is based on `nonaheterov'.}\fi%
  2673. \nonaheterov[#1]{1==O}{#2}}
  2674. \def\benzofuranevi{\@ifnextchar[{\@benzofuranevi}{\@benzofuranevi[rb]}}
  2675. \def\@benzofuranevi[#1]#2{%
  2676. \iforigpt \typeout{command `benzofuranevi' is based on `nonaheterovi'.}\fi%
  2677. \nonaheterovi[#1]{1==O}{#2}}
  2678. %
  2679. \def\isobenzofuranev{\@ifnextchar[{\@isobenzofuranev}%
  2680.  {\@isobenzofuranev[cegi]}}
  2681. \def\@isobenzofuranev[#1]#2{%
  2682. \iforigpt \typeout{command `isobenzofuranev' is based on `nonaheterov'.}\fi%
  2683. \nonaheterov[#1]{2==O}{#2}}
  2684. \def\isobenzofuranevi{\@ifnextchar[{\@isobenzofuranevi}%
  2685.  {\@isobenzofuranevi[cegi]}}
  2686. \def\@isobenzofuranevi[#1]#2{%
  2687. \iforigpt \typeout{command `isobenzofuranevi' is based on `nonaheterovi'.}\fi%
  2688. \nonaheterovi[#1]{2==O}{#2}}
  2689. %
  2690. \def\benzoxazolev{\@ifnextchar[{\@benzoxazolev}{\@benzoxazolev[rb]}}
  2691. \def\@benzoxazolev[#1]#2{%
  2692. \iforigpt \typeout{command `benzoxazolev' is based on `nonaheterov'.}\fi%
  2693. \nonaheterov[#1]{1==O;3==N}{#2}}
  2694. \def\benzoxazolevi{\@ifnextchar[{\@benzoxazolevi}{\@benzoxazolevi[rb]}}
  2695. \def\@benzoxazolevi[#1]#2{%
  2696. \iforigpt \typeout{command `benzoxazolevi' is based on `nonaheterovi'.}\fi%
  2697. \nonaheterovi[#1]{1==O;3==N}{#2}}
  2698. %
  2699. % **********************
  2700. % * six-membered unit  *
  2701. % *  (vertical type)   *
  2702. % **********************
  2703. % This macro is a six-membered fragment that can be fused to another 
  2704. % ring structure to produce a new ring system. The following 
  2705. % numbering is adopted in this macro. 
  2706. %
  2707. %          1
  2708. %          *  
  2709. %     6  *   *  2
  2710. %       |     |
  2711. %       |     |
  2712. %     5  *   *  3
  2713. %          *
  2714. %          4 <===== the original point
  2715. %
  2716. %   \sixunitv[BONDLIST]{ATOMLIST}{SUBSLIST}{OMIT}
  2717. %  
  2718. %     BONDLIST = 
  2719. %
  2720. %           none       :  fully saturated
  2721. %           a          :  1,2-double bond
  2722. %           b          :  2,3-double bond
  2723. %           c          :  4,3-double bond
  2724. %           d          :  4,5-double bond
  2725. %           e          :  5,6-double bond
  2726. %           f          :  6,1-double bond
  2727. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  2728. %
  2729. %     ATOMLIST: list of heteroatoms (max 6 atoms)
  2730. %
  2731. %       for n = 1 to 6
  2732. %
  2733. %           n          : Hetero atom, e.g. N, O, etc. at n-position, 
  2734. %                        e.g. 1==N for N at 1-position
  2735. %
  2736. %     SUBSLIST: list of substituents (max 6 substitution positions)
  2737. %
  2738. %       for n = 1 to 6 
  2739. %
  2740. %           nD         :  exocyclic double bond at n-atom
  2741. %           n or nS    :  exocyclic single bond at n-atom
  2742. %           nA         :  alpha single bond at n-atom
  2743. %           nB         :  beta single bond at n-atom
  2744. %           nSA        :  alpha single bond at n-atom (boldface)
  2745. %           nSB        :  beta single bond at n-atom (dotted line)
  2746. %           nSa        :  alpha (not specified) single bond at n-atom
  2747. %           nSb        :  beta (not specified) single bond at n-atom
  2748. %
  2749. %     OMIT:  one bond omitted (a, b, c, d, e, or f)
  2750. %
  2751. %       e.g. 
  2752. %        
  2753. %        \sixhunitv{1==N}{1==Cl;2==F}{e}
  2754. %
  2755. \def\sixunitv{\@ifnextchar[{\@sixunitv}{\@sixunitv[r]}}
  2756. \def\@sixunitv[#1]#2#3#4{%
  2757. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2758. % treatment of atom list %
  2759. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2760. \iniatom\iniflag%initialize%
  2761. \@forsemicol\member:=#2\do{%
  2762. \expandafter\@m@mb@r\member;\relax%
  2763. \expandafter\twoch@r\@membera{}%
  2764. \ifcase\@tmpa%
  2765.  \or \xdef\aaa{\@memberb}%
  2766.  \or \xdef\bbb{\@memberb}%
  2767.  \or \xdef\ccc{\@memberb}%
  2768.  \or \xdef\ddd{\@memberb}%
  2769.  \or \xdef\eee{\@memberb}%
  2770.  \or \xdef\fff{\@memberb}%
  2771. \fi}%
  2772.  \begin{picture}(800,880)(-\shiftii,-\shifti)%
  2773.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  2774.            \put(-\noshift,-\noshift){\circle{50}}% 
  2775.    \typeout{command `sixunitv' origin: %
  2776.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  2777. %%%%%%%%%%%%%%%%%%
  2778. % outer skeleton %
  2779. %%%%%%%%%%%%%%%%%%
  2780. % changed OMIT into a list 1993/11/21 by Shinsaku Fujita
  2781. {\resetbdsw%
  2782. \@tfor\memBer:=#4\do{%
  2783. \if\memBer a\relax\gdef\@aaa{}\fi%
  2784. \if\memBer b\relax\gdef\@bbb{}\fi%
  2785. \if\memBer c\relax\gdef\@ccc{}\fi%
  2786. \if\memBer d\relax\gdef\@ddd{}\fi%
  2787. \if\memBer e\relax\gdef\@eee{}\fi%
  2788. \if\memBer f\relax\gdef\@fff{}\fi%
  2789. }%
  2790. \if\@aaa a\relax\skbonda\fi% bond between 1 and 2
  2791. \if\@bbb b\relax\skbondb\fi% bond between 2 and 3
  2792. \if\@ccc c\relax\skbondc\fi% bond between 3 and 4
  2793. \if\@ddd d\relax\skbondd\fi% bond between 4 and 5
  2794. \if\@eee e\relax\skbonde\fi% bond between 5 and 6
  2795. \if\@fff f\relax\skbondf\fi% bond between 6 and 1
  2796. }%
  2797. % old
  2798. %\ifx#4a\relax\else%
  2799. % \skbonda% bond between 1 and 2
  2800. %\fi%
  2801. %\ifx#4f\relax\else%
  2802. % \skbondf% bond between 1 and 6
  2803. %\fi%
  2804. %\ifx#4c\relax\else%
  2805. % \skbondc% bond between 4 and 3
  2806. %\fi%
  2807. %\ifx#4d\relax\else%
  2808. % \skbondd% bond between 4 and 5
  2809. %\fi%
  2810. %\ifx#4b\relax\else%
  2811. % \skbondb% bond between 3 and 2
  2812. %\fi%
  2813. %\ifx#4e\relax\else%
  2814. % \skbonde% bond between 5 and 6
  2815. %\fi%
  2816. %%%%%%%%%%%%%%%%%%%%%
  2817. % inner double bond %
  2818. %%%%%%%%%%%%%%%%%%%%%
  2819. \@tfor\member:=#1\do{%
  2820. \if\member r\relax%
  2821. \else\if\member l\relax%
  2822. \else\if\member a\relax% 
  2823.  \ifx#4a\relax\else%
  2824.   \bonda%
  2825.  \fi%
  2826. \else\if\member b\relax% 
  2827.  \ifx#4b\relax\else%
  2828.    \bondb%
  2829.  \fi%
  2830. \else\if\member c\relax%
  2831.  \ifx#4c\relax\else%
  2832.    \bondc%
  2833.  \fi%
  2834. \else\if\member d\relax%
  2835.  \ifx#4d\relax\else%
  2836.    \bondd%
  2837.  \fi%
  2838. \else\if\member e\relax%
  2839.  \ifx#4e\relax\else%
  2840.    \bonde%
  2841.  \fi%
  2842. \else\if\member f\relax%
  2843.  \ifx#4f\relax\else%
  2844.    \bondf%
  2845.  \fi%
  2846. \else\if\member A%left aromatic circle 
  2847.   \put(0,203){\circle{240}}%               %circle
  2848. \else \expandafter\twoch@@r\member{}{}%
  2849.       \if\@@tmpa 1\relax%
  2850.         \putratom{-38}{282}{\@@tmpb}%      % right type
  2851.       \else\if\@@tmpa 2\relax%
  2852.         \putratom{60}{253}{\@@tmpb}%       % right type
  2853.       \else\if\@@tmpa 3\relax%
  2854.         \putratom{60}{120}{\@@tmpb}%       % right type
  2855.       \else\if\@@tmpa 4\relax%
  2856.         \putratom{-38}{68}{\@@tmpb}%       % right type
  2857.       \fi\fi\fi\fi%
  2858. \fi\fi\fi\fi\fi\fi\fi\fi\fi%
  2859. }%
  2860. %%%%%%%%%%%%%%%%%%%%%%%%
  2861. % setting hetero atoms %
  2862. %%%%%%%%%%%%%%%%%%%%%%%%
  2863. \ifx\ddd\empty\else%
  2864.    \@cliptrue% 
  2865.    \putratom{-31}{-10}{\ddd}%  % right type
  2866. \fi%
  2867. \ifx\aaa\empty\else%
  2868.      \@acliptrue%
  2869.      \putratom{-31}{356}{\aaa}%  % right type
  2870. \fi%
  2871. \ifx\bbb\empty\else%
  2872.      \@bcliptrue%
  2873.      \putratom{135}{280}{\bbb}%  % right type
  2874. \fi%
  2875. \ifx\ccc\empty\else%
  2876.      \@ccliptrue%
  2877.      \putratom{135}{65}{\ccc}%   % right type
  2878. \fi%
  2879. \ifx\fff\empty\else%
  2880.      \@fcliptrue%
  2881.      \putlatom{-135}{280}{\bbb}% % left type
  2882. \fi%
  2883. \ifx\eee\empty\else%
  2884.      \@ecliptrue%
  2885.      \putlatom{-135}{65}{\ccc}%  % left type
  2886. \fi%
  2887. \setsixringv{#3}{0}{0}{7}{0}%
  2888. \end{picture}\iniatom\iniflag}%     %end of \sixunitv macro
  2889. %
  2890. % **********************
  2891. % * five-membered unit *
  2892. % *  (vertical type)   *
  2893. % **********************
  2894. % This macro is a five-membered fragment that can be fused to another 
  2895. % ring structure to produce a new ring system. The following 
  2896. % numbering is adopted in this macro. 
  2897. %
  2898. %     4 _______ 3
  2899. %       |     |
  2900. %       |     |
  2901. %     5  *   *  2
  2902. %          *
  2903. %          1 <===== the original point
  2904. %
  2905. %
  2906. %   \fiveunitv[BONDLIST]{ATOMLIST}{SUBSLIST}{OMIT}
  2907. %  
  2908. %     BONDLIST: list of inner double bonds 
  2909. %
  2910. %           a          :  1,2-double bond
  2911. %           b          :  2,3-double bond
  2912. %           c          :  4,3-double bond
  2913. %           d          :  4,5-double bond
  2914. %           e          :  5,1-double bond
  2915. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  2916. %
  2917. %     ATOMLIST: list of heteroatoms (max 5 atoms)
  2918. %
  2919. %       for n = 1 to 5
  2920. %
  2921. %           n          : Hetero atom, e.g. N, O, etc. at n-position
  2922. %                        e.g. 1==N for N at 1-position
  2923. %
  2924. %     SUBSLIST: list of substituents (max 5 substitution positions)
  2925. %
  2926. %       for n = 1 to 5 
  2927. %
  2928. %           nD         :  exocyclic double bond at n-atom
  2929. %           n or nS    :  exocyclic single bond at n-atom
  2930. %           nA         :  alpha single bond at n-atom
  2931. %           nB         :  beta single bond at n-atom
  2932. %           nSA        :  alpha single bond at n-atom (boldface)
  2933. %           nSB        :  beta single bond at n-atom (dotted line)
  2934. %           nSa        :  alpha (not specified) single bond at n-atom
  2935. %           nSb        :  beta (not specified) single bond at n-atom
  2936. %
  2937. %     OMIT:  one bond omitted (a, b, c, d, e, or f)
  2938. %
  2939. %       e.g. 
  2940. %        
  2941. %        \fiveunitv{1==N}{1==H;2==F}{a}
  2942. %
  2943. \def\fiveunitv{\@ifnextchar[{\@fiveunitv}{\@fiveunitv[r]}}
  2944. \def\@fiveunitv[#1]#2#3#4{%
  2945. \iniatom\iniflag%initialize
  2946. %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
  2947. \@forsemicol\member:=#2\do{%
  2948. \expandafter\@m@mb@r\member;\relax%
  2949. \expandafter\twoch@r\@membera{}%
  2950. \ifcase\@tmpa%
  2951.  \or \xdef\ddd{\@memberb}%
  2952.  \or \xdef\ccc{\@memberb}%
  2953.  \or \xdef\bbb{\@memberb}%
  2954.  \or \xdef\fff{\@memberb}%
  2955.  \or \xdef\eee{\@memberb}%
  2956. \fi}%
  2957.  \begin{picture}(800,880)(-\shiftii,-\shifti)%
  2958.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  2959.            \put(-\noshift,-\noshift){\circle{50}}% 
  2960.    \typeout{command `fiveunitv' origin: %
  2961.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  2962. %%%%%%%%%%%%%%%%%%
  2963. % outer skeleton %
  2964. %%%%%%%%%%%%%%%%%%
  2965. % changed OMIT to a list 1993/11/21 by Shinsaku Fujita
  2966. {\resetbdsw%
  2967. \@tfor\memBer:=#4\do{%
  2968. \if\memBer a\relax\gdef\@aaa{}\fi%
  2969. \if\memBer b\relax\gdef\@bbb{}\fi%
  2970. \if\memBer c\relax\gdef\@ccc{}\fi%
  2971. \if\memBer d\relax\gdef\@ddd{}\fi%
  2972. \if\memBer e\relax\gdef\@eee{}\fi%
  2973. %\if\memBer f\relax\gdef\@fff{}\fi%
  2974. }%
  2975. \if\@aaa a\relax\skbondc\fi% bond between 1 and 2
  2976. \if\@bbb b\relax\skbondb\fi% bond between 2 and 3
  2977. \if\@ccc c\relax\skbondhoriz\fi% bond between 3 and 4
  2978. \if\@ddd d\relax\skbonde\fi% bond between 4 and 5
  2979. \if\@eee e\relax\skbondd\fi% bond between 5 and 6
  2980. %\if\@fff f\relax\skbondf\fi% bond between 6 and 1
  2981. }%
  2982. % old
  2983. %\ifx#4a\relax\else%
  2984. % \skbondc%bond between 1 and 2
  2985. %\fi%
  2986. %\ifx#4e\relax\else%
  2987. % \skbondd%bond between 1 and 5
  2988. %\fi%
  2989. %\ifx#4b\relax\else%
  2990. %  \skbondb%bond between 2 to 3
  2991. %\fi%
  2992. %\ifx#4d\relax\else%
  2993. % \skbonde%bond between 5 and 4
  2994. %\fi%
  2995. %\ifx#4c\relax\else%
  2996. % \skbondhoriz%bond between 4 and 3
  2997. %\fi%
  2998. %%%%%%%%%%%%%%%%%%%%%
  2999. % inner double bond %
  3000. %%%%%%%%%%%%%%%%%%%%%
  3001. \@tfor\member:=#1\do{%
  3002. \if\member r%
  3003. \else\if\member a\relax%
  3004.  \ifx#4a\relax\else%
  3005.    \bondc%
  3006.  \fi%
  3007. \else\if\member b\relax%
  3008.  \ifx#4b\relax\else%
  3009.   \bondb%
  3010.  \fi%
  3011. \else\if\member c\relax%
  3012.  \ifx#4c\relax\else%
  3013.    \bondhoriz%
  3014.  \fi%
  3015. \else\if\member d\relax%
  3016.  \ifx#4d\relax\else%
  3017.   \bonde%
  3018.  \fi%
  3019. \else\if\member e\relax%
  3020.  \ifx#4e\relax\else%
  3021.   \bondd%
  3022.  \fi%
  3023. \else \expandafter\twoch@@r\member{}{}%     %plus or minus charges
  3024.       \if\@@tmpa 1\relax%
  3025.         \putratom{-38}{68}{\@@tmpb}%        % right type
  3026.       \else\if\@@tmpa 2\relax%
  3027.         \putratom{60}{120}{\@@tmpb}%        % right type
  3028.       \else\if\@@tmpa 3\relax%
  3029.         \putratom{60}{233}{\@@tmpb}%        % right type
  3030.       \else\if\@@tmpa 4\relax%
  3031.         \putratom{-60}{233}{\@@tmpb}%       % right type
  3032.       \else\if\@@tmpa 5\relax%
  3033.         \putratom{-60}{120}{\@@tmpb}%       % right type
  3034.       \fi\fi\fi\fi\fi%
  3035. \fi\fi\fi\fi\fi\fi}%
  3036. %%%%%%%%%%%%%%%%%%%%%%%
  3037. % setting heteroatoms %
  3038. %%%%%%%%%%%%%%%%%%%%%%%
  3039. \ifx\ddd\empty\else%
  3040.    \@cliptrue% 
  3041.    \putratom{-31}{-10}{\ddd}%    % right type at 1
  3042. \fi%
  3043. \ifx\bbb\empty\else%
  3044.      \@bcliptrue%
  3045.      \putratom{135}{280}{\bbb}%  % right type at 3
  3046. \fi%
  3047. \ifx\fff\empty\else%
  3048.      \@fcliptrue%
  3049.      \putlatom{-135}{280}{\fff}% % left type at 4
  3050. \fi%
  3051. \ifx\ccc\empty\else%
  3052.      \@ccliptrue%
  3053.      \putratom{135}{65}{\ccc}%   % right type at 2
  3054. \fi%
  3055. \ifx\eee\empty\else%
  3056.      \@ecliptrue%
  3057.      \putlatom{-135}{65}{\eee}%  % left type at 5 
  3058. \fi%
  3059. %%%%%%%%%%%%%%%%%%%%%%%%
  3060. % setting substituents %
  3061. %%%%%%%%%%%%%%%%%%%%%%%%
  3062. \setsixringv{#3}{5}{1}{5}{-1}%   % for 1 to 3
  3063. \setsixringv{#3}{10}{4}{7}{-1}%  % for 4 to 5
  3064. \end{picture}\iniatom\iniflag}               %end of \fiveunitv macro
  3065. %
  3066. % ************************************
  3067. % * five-membered unit               *
  3068. % *  (vertical type, inverse type)   *
  3069. % ************************************
  3070. % This macro is a five-membered fragment that can be fused to another 
  3071. % ring structure to produce a new ring system. The following 
  3072. % numbering is adopted in this macro. 
  3073. %
  3074. %          1
  3075. %          * 
  3076. %     6  *   *  2
  3077. %       |     |
  3078. %       |_____|
  3079. %     4         3
  3080. %          *
  3081. %        (0,0) <===== the original point
  3082. %
  3083. %   \fiveunitvi[BONDLIST]{ATOMLIST}{SUBSLIST}{OMIT}
  3084. %  
  3085. %     BONDLIST: list of inner double bonds 
  3086. %
  3087. %           a          :  1,2-double bond
  3088. %           b          :  2,3-double bond
  3089. %           c          :  4,3-double bond
  3090. %           d          :  4,5-double bond
  3091. %           e          :  5,1-double bond
  3092. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  3093. %
  3094. %     ATOMLIST: list of heteroatoms (max 5 atoms)
  3095. %
  3096. %       for n = 1 to 5
  3097. %
  3098. %           n          : Hetero atom, e.g. N, O, etc. at n-position
  3099. %                        e.g. 1==N for N at 1-position
  3100. %
  3101. %     SUBSLIST: list of substituents (max 5 substitution positions)
  3102. %
  3103. %       for n = 1 to 5 
  3104. %
  3105. %           nD         :  exocyclic double bond at n-atom
  3106. %           n or nS    :  exocyclic single bond at n-atom
  3107. %           nA         :  alpha single bond at n-atom
  3108. %           nB         :  beta single bond at n-atom
  3109. %           nSA        :  alpha single bond at n-atom (boldface)
  3110. %           nSB        :  beta single bond at n-atom (dotted line)
  3111. %           nSa        :  alpha (not specified) single bond at n-atom
  3112. %           nSb        :  beta (not specified) single bond at n-atom
  3113. %
  3114. %     OMIT:  one bond omitted (a, b, c, d, e, or f)
  3115. %
  3116. %       e.g. 
  3117. %        
  3118. %        \fiveunitvi{1==N}{1==H;2==F}{a}
  3119. %
  3120. \def\fiveunitvi{\@ifnextchar[{\@fiveunitvi}{\@fiveunitvi[r]}}
  3121. \def\@fiveunitvi[#1]#2#3#4{%
  3122. \iniatom\iniflag%initialize
  3123. %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
  3124. \@forsemicol\member:=#2\do{%
  3125. \expandafter\@m@mb@r\member;\relax%
  3126. \expandafter\twoch@r\@membera{}%
  3127. \ifcase\@tmpa%
  3128.  \or \xdef\aaa{\@memberb}%
  3129.  \or \xdef\bbb{\@memberb}%
  3130.  \or \xdef\ccc{\@memberb}%
  3131.  \or \xdef\eee{\@memberb}%
  3132.  \or \xdef\fff{\@memberb}%
  3133. \fi}%
  3134.  \begin{picture}(800,880)(-\shiftii,-\shifti)%
  3135.   \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  3136.            \put(-\noshift,-\noshift){\circle{50}}% 
  3137.    \typeout{command `fiveunitvi' origin: %
  3138.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  3139. %%%%%%%%%%%%%%%%%%
  3140. % outer skeleton %
  3141. %%%%%%%%%%%%%%%%%%
  3142. % changed OMIT to a list 1993/11/21 by Shinsaku Fujita
  3143. {\resetbdsw%
  3144. \@tfor\memBer:=#4\do{%
  3145. \if\memBer a\relax\gdef\@aaa{}\fi%
  3146. \if\memBer b\relax\gdef\@bbb{}\fi%
  3147. \if\memBer c\relax\gdef\@ccc{}\fi%
  3148. \if\memBer d\relax\gdef\@ddd{}\fi%
  3149. \if\memBer e\relax\gdef\@eee{}\fi%
  3150. %\if\memBer f\relax\gdef\@fff{}\fi%
  3151. }%
  3152. \if\@aaa a\relax\skbonda\fi% bond between 1 and 2
  3153. \if\@bbb b\relax\skbondb\fi% bond between 2 and 3
  3154. \if\@ccc c\relax\skbondhorizi\fi% bond between 3 and 4
  3155. \if\@ddd d\relax\skbonde\fi% bond between 4 and 5
  3156. \if\@eee e\relax\skbondf\fi% bond between 5 and 6
  3157. %\if\@fff f\relax\skbondf\fi% bond between 6 and 1
  3158. }%
  3159. % old
  3160. %\ifx#4a\relax\else%
  3161. % \skbonda%bond between 1 and 2
  3162. %\fi%
  3163. %\ifx#4e\relax\else%
  3164. % \skbondf%bond between 1 and 5
  3165. %\fi%
  3166. %\ifx#4b\relax\else%
  3167. %  \skbondb%bond between 2 to 3
  3168. %\fi%
  3169. %\ifx#4d\relax\else%
  3170. % \skbonde%bond between 5 and 4
  3171. %\fi%
  3172. %\ifx#4c\relax\else%
  3173. % \skbondhorizi%bond between 4 and 3
  3174. %\fi%
  3175. %%%%%%%%%%%%%%%%%%%%%
  3176. % inner double bond %
  3177. %%%%%%%%%%%%%%%%%%%%%
  3178. \@tfor\member:=#1\do{%
  3179. \if\member r%
  3180. \else\if\member a\relax%
  3181.  \ifx#4a\relax\else%
  3182.    \bonda%
  3183.  \fi%
  3184. \else\if\member b\relax%
  3185.  \ifx#4b\relax\else%
  3186.   \bondb%
  3187.  \fi%
  3188. \else\if\member c\relax%
  3189.  \ifx#4c\relax\else%
  3190.    \bondhorizi%
  3191.  \fi%
  3192. \else\if\member d\relax%
  3193.  \ifx#4d\relax\else%
  3194.   \bonde%
  3195.  \fi%
  3196. \else\if\member e\relax%
  3197.  \ifx#4e\relax\else%
  3198.   \bondf%
  3199.  \fi%
  3200. \else \expandafter\twoch@@r\member{}{}%     %plus or minus charges
  3201.       \if\@@tmpa 1\relax%
  3202.         \putratom{-38}{282}{\@@tmpb}%      % right type
  3203.       \else\if\@@tmpa 2\relax%
  3204.         \putratom{60}{233}{\@@tmpb}%        % right type
  3205.       \else\if\@@tmpa 3\relax%
  3206.         \putratom{60}{120}{\@@tmpb}%        % right type
  3207.       \else\if\@@tmpa 4\relax%
  3208.         \putratom{-60}{120}{\@@tmpb}%       % right type
  3209.       \else\if\@@tmpa 5\relax%
  3210.         \putratom{-60}{233}{\@@tmpb}%       % right type
  3211.       \fi\fi\fi\fi\fi%
  3212. \fi\fi\fi\fi\fi\fi}%
  3213. %%%%%%%%%%%%%%%%%%%%%%%
  3214. % setting heteroatoms %
  3215. %%%%%%%%%%%%%%%%%%%%%%%
  3216. \ifx\aaa\empty\else%
  3217.      \@acliptrue%
  3218.      \putratom{-31}{356}{\aaa}%  % right type  at 1
  3219. \fi%
  3220. \ifx\bbb\empty\else%
  3221.      \@bcliptrue%
  3222.      \putratom{135}{280}{\bbb}%  % right type at 3
  3223. \fi%
  3224. \ifx\fff\empty\else%
  3225.      \@fcliptrue%
  3226.      \putlatom{-135}{280}{\fff}% % left type at 4
  3227. \fi%
  3228. \ifx\ccc\empty\else%
  3229.      \@ccliptrue%
  3230.      \putratom{135}{65}{\ccc}%   % right type at 2
  3231. \fi%
  3232. \ifx\eee\empty\else%
  3233.      \@ecliptrue%
  3234.      \putlatom{-135}{65}{\eee}%  % left type at 5 
  3235. \fi%
  3236. %%%%%%%%%%%%%%%%%%%%%%%%
  3237. % setting substituents %
  3238. %%%%%%%%%%%%%%%%%%%%%%%%
  3239. \setsixringv{#3}{0}{0}{4}{0}%  % for 1 to 3
  3240. \setsixringv{#3}{1}{4}{7}{0}%  % for 4 to 5
  3241. \end{picture}\iniatom\iniflag}%               %end of \fiveunitvi macro
  3242. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3243. %%%%%%%%%%%%%%%%%%%
  3244. % horizontal bond %
  3245. %%%%%%%%%%%%%%%%%%%
  3246. % horizontal inner bond for four-membered rings
  3247. \def\bondshoriz{%
  3248.  \begin{picture}(200,300)(0,0)
  3249.   \ifx\fff\empty%
  3250.     \ifx\bbb\empty%
  3251.      \put(-138,270){\line(1,0){134}}%double bond 4-3
  3252.     \else%
  3253.      \put(-138,270){\line(1,0){115}}%double bond 4-3
  3254.     \fi%
  3255.   \else%
  3256.     \ifx\bbb\empty%
  3257.      \put(-120,270){\line(1,0){115}}%double bond 4-3
  3258.     \else%
  3259.      \put(-120,270){\line(1,0){96}}%double bond 4-3
  3260.     \fi%
  3261.   \fi\end{picture}}%
  3262. % horizontal inner bond for four-membered rings (inverse type) 
  3263. \def\bondshorizi{%
  3264.  \begin{picture}(200,300)(0,0)
  3265.   \ifx\eee\empty%
  3266.     \ifx\ccc\empty%
  3267.      \put(-138,136){\line(1,0){134}}%double bond 4-3
  3268.     \else%%
  3269.      \put(-138,136){\line(1,0){115}}%double bond 4-3
  3270.     \fi%
  3271.   \else%
  3272.     \ifx\ccc\empty%
  3273.      \put(-120,136){\line(1,0){115}}%double bond 4-3
  3274.     \else%
  3275.      \put(-120,136){\line(1,0){96}}%double bond 4-3
  3276.     \fi%
  3277.   \fi\end{picture}}%
  3278. %%%
  3279. %horizontal bond for four-membered rings
  3280. \def\skbondshoriz{%
  3281.  \begin{picture}(200,300)(0,0)
  3282.   \ifx\fff\empty%
  3283.     \ifx\bbb\empty%
  3284.      \put(-171,303){\line(1,0){200}}%bond 4-3
  3285.     \else%
  3286.      \put(-171,303){\line(1,0){158}}%bond 4-3
  3287.     \fi%
  3288.   \else%
  3289.     \ifx\bbb\empty%
  3290.      \put(29,303){\line(-1,0){158}}%bond 4-3
  3291.     \else%
  3292.      \put(-129,303){\line(1,0){116}}%bond 4-3
  3293.     \fi%
  3294.   \fi\end{picture}}%
  3295. %horizontal bond for five-membered rings (inverse type)
  3296. \def\skbondshorizi{%
  3297.  \begin{picture}(200,300)(0,0)
  3298.   \ifx\eee\empty%
  3299.     \ifx\ccc\empty%
  3300.      \put(-171,103){\line(1,0){200}}%bond 4-3
  3301.     \else%
  3302.      \put(-171,103){\line(1,0){158}}%bond 4-3
  3303.     \fi%
  3304.   \else%
  3305.     \ifx\ccc\empty%
  3306.      \put(29,103){\line(-1,0){158}}%bond 4-3
  3307.     \else%
  3308.      \put(-129,103){\line(1,0){116}}%bond 4-3
  3309.     \fi%
  3310.   \fi\end{picture}}%
  3311. % **************************
  3312. % * fourhetero derivatives *
  3313. % *  (vertical type)       *
  3314. % **************************
  3315. % The following numbering is adopted in this macro. 
  3316. %
  3317. %          c
  3318. %     4  _____  3
  3319. %    d  |     |  b
  3320. %       |     |
  3321. %     1  -----  2<===== the original point
  3322. %          a
  3323. %
  3324. %   \fourhetero[BONDLIST]{ATOMLIST}{SUBSLIST}
  3325. %  
  3326. %     BONDLIST: list of inner double bonds 
  3327. %
  3328. %           a          :  1,2-double bond
  3329. %           b          :  2,3-double bond
  3330. %           c          :  4,3-double bond
  3331. %           e          :  4,1-double bond
  3332. %
  3333. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  3334. %
  3335. %     ATOMLIST: list of heteroatoms (max 5 atoms)
  3336. %
  3337. %       for n = 1 to 4
  3338. %
  3339. %           n          : Hetero atom, e.g. N, O, etc. at n-position
  3340. %                        e.g. 1==N for N at 1-position
  3341. %
  3342. %     SUBSLIST: list of substituents (max 5 substitution positions)
  3343. %
  3344. %       for n = 1 to 4 
  3345. %
  3346. %           nD         :  exocyclic double bond at n-atom
  3347. %           n or nS    :  exocyclic single bond at n-atom
  3348. %           nA         :  alpha single bond at n-atom
  3349. %           nB         :  beta single bond at n-atom
  3350. %           nSA        :  alpha single bond at n-atom (boldface)
  3351. %           nSB        :  beta single bond at n-atom (dotted line)
  3352. %           nSa        :  alpha (not specified) single bond at n-atom
  3353. %           nSb        :  beta (not specified) single bond at n-atom
  3354. %
  3355. %       e.g. 
  3356. %        
  3357. %        \fourhetero{1==N}{1==H;2==F}
  3358. %        \fourhetero[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  3359. %        \fourhetero[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  3360. %
  3361. \def\fourhetero{\@ifnextchar[{\@fourhetero}{\@fourhetero[r]}}
  3362. \def\@fourhetero[#1]#2#3{%
  3363. \iniatom\iniflag%initialize
  3364. \@forsemicol\member:=#2\do{%
  3365. \expandafter\@m@mb@r\member;\relax%
  3366. \expandafter\twoch@r\@membera{}%
  3367. \ifcase\@tmpa%
  3368.  \or \xdef\eee{\@memberb}%
  3369.  \or \xdef\ccc{\@memberb}%
  3370.  \or \xdef\bbb{\@memberb}%
  3371.  \or \xdef\fff{\@memberb}%
  3372. \fi}%
  3373. %
  3374. %\begin{picture}(800,880)(-\shiftii,-\shifti)%
  3375. %  \iforigpt\put(-\shiftii,-\shifti){\circle*{50}}%
  3376. %           \put(-\noshift,-\noshift){\circle{50}}% 
  3377. %   \typeout{command `fourhetero' origin: %
  3378. %    (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  3379. % Correction of the zero point: S. Fujita 1993/11/19
  3380. %   x axis: 400 + 171 = 571
  3381. %   y axis: 240 - 103 = 137
  3382. %
  3383. \begin{picture}(800,880)(-571,-137)%
  3384.   \iforigpt\put(-571,-137){\circle*{50}}%
  3385.            \put(-171,103){\circle{50}}% 
  3386.    \typeout{command `fourhetero' origin: %
  3387.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  3388. %%%%%%%%%%%%%%%%%%
  3389. % outer skeleton %
  3390. %%%%%%%%%%%%%%%%%%
  3391. %\skbondc%bond between 1 and 2
  3392. %\skbondd%bond between 1 and 5
  3393. \put(-142,0){\skbondb}%bond between 2 to 3
  3394. \put(0,0){\skbonde}%bond between 1 and 4
  3395. \put(0,0){\skbondshoriz}%bond between 4 and 3
  3396. \put(0,0){\skbondshorizi}%bond between 1 and 2
  3397. %%%%%%%%%%%%%%%%%%%%%
  3398. % inner double bond %
  3399. %%%%%%%%%%%%%%%%%%%%%
  3400. \@tfor\member:=#1\do{%
  3401. \if\member r%
  3402. \else\if\member a\relax \put(0,0){\bondshorizi}%
  3403. \else\if\member b\relax \put(-142,0){\bondb}%
  3404. \else\if\member c\relax \put(0,0){\bondshoriz}%
  3405. \else\if\member d\relax \put(0,0){\bonde}%
  3406. \else \expandafter\twoch@@r\member{}{}%     %plus or minus charges
  3407.       \if\@@tmpa 1\relax%
  3408.         \putlatom{-200}{120}{\scriptsize \@@tmpb}%       % right type
  3409.       \else\if\@@tmpa 2\relax%
  3410.         \putratom{60}{120}{\scriptsize \@@tmpb}%        % right type
  3411.       \else\if\@@tmpa 3\relax%
  3412.         \putratom{60}{233}{\scriptsize \@@tmpb}%        % right type
  3413.       \else\if\@@tmpa 4\relax%
  3414.         \putlatom{-200}{233}{\scriptsize \@@tmpb}%       % right type
  3415.       \fi\fi\fi%
  3416. \fi\fi\fi\fi\fi\fi}%
  3417. %%%%%%%%%%%%%%%%%%%%%%%
  3418. % setting heteroatoms %
  3419. %%%%%%%%%%%%%%%%%%%%%%%
  3420. \ifx\bbb\empty\else%
  3421.      \@bcliptrue%
  3422.      \putratom{-7}{280}{\bbb}%  % right type at 3
  3423. \fi%
  3424. \ifx\fff\empty\else%
  3425.      \@fcliptrue%
  3426.      \putlatom{-135}{280}{\fff}% % left type at 4
  3427. \fi%
  3428. \ifx\ccc\empty\else%
  3429.      \@ccliptrue%
  3430.      \putratom{-7}{65}{\ccc}%   % right type at 2
  3431. \fi%
  3432. \ifx\eee\empty\else%
  3433.      \@ecliptrue%
  3434.      \putlatom{-135}{65}{\eee}%  % left type at 5 
  3435. \fi%
  3436. %%%%%%%%%%%%%%%%%%%%%%%%
  3437. % setting substituents %
  3438. %%%%%%%%%%%%%%%%%%%%%%%%
  3439. \put(-142,0){\setsixringv{#3}{5}{1}{4}{-1}}% for 2 to 3
  3440. \put(0,0){\setsixringv{#3}{4}{4}{6}{0}}% for 1
  3441. \put(0,0){\setsixringv{#3}{2}{5}{7}{0}}% for 4
  3442. \end{picture}\iniatom\iniflag}%               %end of \fourhetero macro
  3443. %
  3444. % **********************
  3445. % * bonds for triangle *
  3446. % **********************
  3447. % fff 3--------2bbb
  3448. %      `     /
  3449. %   ddd  `1/ <===== the original point
  3450. % bond between 1 and 2
  3451.  \def\bondtria{%
  3452.   \ifx\ddd\empty%
  3453.    \ifx\bbb\empty%
  3454.     \put(-6,42){\line(3,5){72}}%           %double bond 1-2
  3455.    \else%
  3456.     \put(-6,42){\line(3,5){60}}%           %double bond 1-2
  3457.    \fi%
  3458.   \else%
  3459.    \ifx\bbb\empty%
  3460.     \put(6,62){\line(3,5){60}}%            %double bond 1-2
  3461.    \else%
  3462.     \put(10,32){\line(3,5){60}}%           %double bond 1-2
  3463.    \fi%                                    
  3464.   \fi%
  3465. }%
  3466. % bond between 1 and 3
  3467.  \def\bondtrib{%
  3468.   \ifx\ddd\empty%
  3469.    \ifx\fff\empty%
  3470.     \put(6,42){\line(-3,5){72}}%           %double bond 1-3
  3471.    \else%
  3472.     \put(6,42){\line(-3,5){60}}%           %double bond 1-3
  3473.    \fi%
  3474.   \else%
  3475.    \ifx\fff\empty%
  3476.     \put(-6,62){\line(-3,5){60}}%          %double bond 1-2
  3477.    \else%
  3478.     \put(6,42){\line(-3,5){60}}%           %double bond 1-2
  3479.    \fi%                                    
  3480.   \fi%
  3481.  }%
  3482. %bond between 1 and 2
  3483. \def\skbondtria{%
  3484.  \begin{picture}(200,200)(0,0)
  3485.   \ifx\ddd\empty%
  3486.     \ifx\bbb\empty%
  3487.      \put(0,0){\line(3,5){103}}%           %bond 1-2
  3488.     \else%
  3489.      \put(0,0){\line(3,5){80}}%            %bond 1-2
  3490.     \fi%
  3491.   \else%
  3492.     \ifx\bbb\empty%
  3493.      \put(103,171){\line(-3,-5){80}}%      %bond 1-2
  3494.     \else%
  3495.      \put(35,21){\line(3,5){60}}%          %bond 1-2
  3496.     \fi%
  3497.   \fi\end{picture}}%
  3498. %bond between 1 and 3
  3499. \def\skbondtrib{%
  3500.  \begin{picture}(200,200)(0,0)
  3501.   \ifx\ddd\empty%
  3502.     \ifx\fff\empty%
  3503.      \put(0,0){\line(-3,5){103}}%         %bond 1-3
  3504.     \else%
  3505.      \put(0,0){\line(-3,5){80}}%          %bond 1-3
  3506.     \fi%
  3507.   \else%
  3508. %    \ifx\eee\empty%bug fix 1993/11/19
  3509.     \ifx\fff\empty%
  3510.      \put(-103,171){\line(3,-5){80}}%     %bond 1-3
  3511.     \else%
  3512.      \put(-35,21){\line(-3,5){60}}%       %bond 1-3
  3513.     \fi%
  3514.   \fi\end{picture}}%
  3515. %
  3516. % ****************************
  3517. % * thereehetero derivatives *
  3518. % *  (vertical type)         *
  3519. % ****************************
  3520. % The following numbering is adopted in this macro. 
  3521. %
  3522. %         b
  3523. %     3--------2
  3524. %    c `     / a
  3525. %        `1/ <===== the original point
  3526. %
  3527. %
  3528. %   \threehetero[BONDLIST]{ATOMLIST}{SUBSLIST}
  3529. %  
  3530. %     BONDLIST = 
  3531. %
  3532. %           none       :  saturated 
  3533. %           a          :  1,2-double bond
  3534. %           b          :  2,3-double bond
  3535. %           c          :  3,1-double bond
  3536. %           A          :  aromatic circle 
  3537. %           {n+}       :  plus at the n-hetero atom (n = 1 to 3)
  3538. %                      :  n=4 -- outer plus at 1 position
  3539. %                      :  n=5 -- outer plus at 2 position
  3540. %                      :  n=6 -- outer plus at 3 position
  3541. %           {0+}       :  plus at the center of a cyclopropane ring
  3542. %
  3543. %     ATOMLIST: list of heteroatoms (max 3 atoms)
  3544. %
  3545. %       for n = 1 to 3
  3546. %
  3547. %           n          : Hetero atom, e.g. N, O, etc. at n-position, 
  3548. %                        e.g. 1==N for N at 1-position
  3549. %
  3550. %     SUBSLIST: list of substituents (max 3 substitution positions)
  3551. %
  3552. %       for n = 1 to 3 
  3553. %
  3554. %           nD         :  exocyclic double bond at n-atom
  3555. %           n or nS    :  exocyclic single bond at n-atom
  3556. %           nA         :  alpha single bond at n-atom
  3557. %           nB         :  beta single bond at n-atom
  3558. %           nSA        :  alpha single bond at n-atom (boldface)
  3559. %           nSB        :  beta single bond at n-atom (dotted line)
  3560. %           nSa        :  alpha (not specified) single bond at n-atom
  3561. %           nSb        :  beta (not specified) single bond at n-atom
  3562. %
  3563. %       e.g. 
  3564. %        
  3565. %        \threehetero{1==N}{1==Cl;2==F}
  3566. %        \threehetero[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  3567. %        \threehetero{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
  3568. %
  3569. \def\threehetero{\@ifnextchar[{\@threehetero}{\@threehetero[r]}}
  3570. \def\@threehetero[#1]#2#3{%
  3571. %%%%%%%%%%%%%%%%%%%%%%%%%%
  3572. % treatment of atom list %
  3573. %%%%%%%%%%%%%%%%%%%%%%%%%%
  3574. \iniatom\iniflag%initialize
  3575. \@forsemicol\member:=#2\do{%
  3576. \expandafter\@m@mb@r\member;\relax%
  3577. \expandafter\twoch@r\@membera{}%
  3578. \ifcase\@tmpa%
  3579.  \or \xdef\ddd{\@memberb}%
  3580.  \or \xdef\bbb{\@memberb}%
  3581.  \or \xdef\fff{\@memberb}%
  3582. \fi}%
  3583. %
  3584. %\begin{picture}(800,880)(-\shiftii,-\shifti)%
  3585. %  \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
  3586. %           \put(-\noshift,-\noshift){\circle{50}}% 
  3587. %  adjust x,y-coodinate by S. Fujita 1993/11/20
  3588. \begin{picture}(800,880)(-468,-240)%
  3589.   \iforigpt \put(-468,-240){\circle*{50}}%
  3590.            \put(-68,0){\circle{50}}% 
  3591.    \typeout{command `threeheterov' origin: %
  3592.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
  3593. %%%%%%%%%%%%%%%%%%
  3594. % outer skeleton %
  3595. %%%%%%%%%%%%%%%%%%
  3596.  \put(-68,0){\skbondtria}% bond between 1 and 2
  3597.  \put(-68,0){\skbondtrib}% bond between 1 and 3
  3598.  \put(0,-132){\skbondshoriz}%bond between 2 and 3
  3599. %%%%%%%%%%%%%%%%%%%%%
  3600. % inner double bond %
  3601. %%%%%%%%%%%%%%%%%%%%%
  3602. \@tfor\member:=#1\do{%
  3603. \if\member r\relax%
  3604. \else\if\member a\relax\put(-68,0){\bondtria}%
  3605. \else\if\member b\relax\put(0,-126){\bondshoriz}%
  3606. \else\if\member c\relax\put(-68,0){\bondtrib}%
  3607. \else\if\member A\relax% aromatic circle 
  3608.   \put(-70,108){\circle{100}}%               %circle
  3609. \else \expandafter\twoch@@r\member{}{}%
  3610.       \if\@@tmpa 0\relax%
  3611.         \putratom{-94}{92}{\scriptsize\@@tmpb}%      % right type
  3612.       \else\if\@@tmpa 1\relax%
  3613.         \putratom{-94}{60}{\scriptsize\@@tmpb}%      % right type
  3614.       \else\if\@@tmpa 2\relax%
  3615.         \putratom{-52}{120}{\scriptsize\@@tmpb}%     % right type
  3616.       \else\if\@@tmpa 3\relax%
  3617.         \putratom{-126}{126}{\scriptsize\@@tmpb}%    % right type
  3618.       \else\if\@@tmpa 4\relax%
  3619.         \putratom{-30}{-20}{\scriptsize\@@tmpb}%      % right type
  3620.       \else\if\@@tmpa 5\relax%
  3621.         \putratom{52}{110}{\scriptsize\@@tmpb}%      % right type
  3622.       \else\if\@@tmpa 6\relax%
  3623.         \putratom{-250}{110}{\scriptsize\@@tmpb}%    % right type
  3624.       \fi\fi\fi\fi\fi\fi\fi%
  3625. \fi\fi\fi\fi\fi%\fi\fi\fi\fi%
  3626. }%
  3627. %%%%%%%%%%%%%%%%%%%%%%%%
  3628. % setting hetero atoms %
  3629. %%%%%%%%%%%%%%%%%%%%%%%%
  3630. \ifx\ddd\empty\else%
  3631.    \@cliptrue%
  3632.    \putratom{-99}{-22}{\ddd}% right type
  3633. \fi%
  3634. \ifx\bbb\empty\else%
  3635.      \@bcliptrue%
  3636.      \putratom{0}{148}{\bbb}% right type
  3637. \fi%
  3638. \ifx\fff\empty\else%
  3639.      \@fcliptrue%
  3640.      \putlatom{-135}{148}{\fff}% left type
  3641. \fi%
  3642. \put(-68,0){\setsixringv{#3}{3}{3}{5}{0}}%subst 1
  3643. \put(-142,-132){\setsixringv{#3}{0}{1}{3}{0}}%subst 2
  3644. \put(0,-132){\setsixringv{#3}{3}{5}{7}{0}}%subst 3
  3645. \end{picture}%
  3646. \iniatom\iniflag}%     %end of \threehetero macro
  3647.  
  3648.